summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-04-25 07:56:01 +0200
committerDaniel Stenberg <daniel@haxx.se>2018-04-25 07:56:01 +0200
commit3c630f9b0af097663a64e5c875c580aa9808a92b (patch)
tree292af1dc89a75239905695a1e719f3c804900af1
parentba67f7d65a42e63eccfe0bcc87f82682d6e4cc9e (diff)
downloadcurl-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
-rw-r--r--lib/transfer.c2
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;
}