diff options
author | Daniel Stenberg <daniel@haxx.se> | 2018-04-25 07:56:01 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-04-25 07:56:01 +0200 |
commit | 3c630f9b0af097663a64e5c875c580aa9808a92b (patch) | |
tree | 292af1dc89a75239905695a1e719f3c804900af1 /lib/transfer.c | |
parent | ba67f7d65a42e63eccfe0bcc87f82682d6e4cc9e (diff) | |
download | curl-3c630f9b0af097663a64e5c875c580aa9808a92b.tar.gz |
strcpy_url: only %-encode values >= 0x80
OSS-Fuzz detected
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8000
Broke in dd7521bcc1b7
Diffstat (limited to 'lib/transfer.c')
-rw-r--r-- | lib/transfer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/transfer.c b/lib/transfer.c index c586c727d..9712a7f7e 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -1519,7 +1519,7 @@ static void strcpy_url(char *output, const char *url, bool relative) left = FALSE; /* fall through */ default: - if(!ISPRINT(*iptr)) { + if(*iptr >= 0x80) { snprintf(optr, 4, "%%%02x", *iptr); optr += 3; } |