diff options
| author | Ed Maste <emaste@FreeBSD.org> | 2020-02-05 16:55:00 +0000 |
|---|---|---|
| committer | Ed Maste <emaste@FreeBSD.org> | 2020-02-05 16:55:00 +0000 |
| commit | 83372bda16b53157be476df6f9c6aac9f2bc12a3 (patch) | |
| tree | 62ffd7da0f8e4ad56765b74cfba223b810902994 /lib/libfetch | |
| parent | 690a8a6acd5b9073f3221a7971d346df2498306f (diff) | |
Notes
Diffstat (limited to 'lib/libfetch')
| -rw-r--r-- | lib/libfetch/fetch.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libfetch/fetch.c b/lib/libfetch/fetch.c index 9eec0730fa7d..82a3c5e451a9 100644 --- a/lib/libfetch/fetch.c +++ b/lib/libfetch/fetch.c @@ -327,6 +327,9 @@ fetch_pctdecode(char *dst, const char *src, size_t dlen) (d2 = fetch_hexval(s[2])) >= 0 && (d1 > 0 || d2 > 0)) { c = d1 << 4 | d2; s += 2; + } else if (s[0] == '%') { + /* Invalid escape sequence. */ + return (NULL); } else { c = *s; } |
