diff options
Diffstat (limited to 'url.c')
-rw-r--r-- | url.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -46,9 +46,9 @@ static char *url_decode_internal(const char **query, int len, break; } - if (c == '%') { + if (c == '%' && (len < 0 || len >= 3)) { int val = hex2chr(q + 1); - if (0 <= val) { + if (0 < val) { strbuf_addch(out, val); q += 3; len -= 3; |