From 3c630f9b0af097663a64e5c875c580aa9808a92b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 25 Apr 2018 07:56:01 +0200 Subject: strcpy_url: only %-encode values >= 0x80 OSS-Fuzz detected https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8000 Broke in dd7521bcc1b7 --- lib/transfer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/transfer.c') 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; } -- cgit v1.2.3