From: Daniel Stenberg Date: Thu, 1 Oct 2020 22:07:41 +0000 (+0200) Subject: tool_setopt: escape binary data to hex, not octal X-Git-Tag: curl-7_73_0~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=01327600e3a9f0bd23383eb21ad7dcdc84a0c249;p=thirdparty%2Fcurl.git tool_setopt: escape binary data to hex, not octal --- diff --git a/src/tool_setopt.c b/src/tool_setopt.c index ea23e9386e..02f3057295 100644 --- a/src/tool_setopt.c +++ b/src/tool_setopt.c @@ -268,7 +268,7 @@ static char *c_escape(const char *str, curl_off_t len) e += 2; } else if(! isprint(c)) { - msnprintf(e, 5, "\\%03o", (unsigned)c); + msnprintf(e, 5, "\\x%02x", (unsigned)c); e += 4; } else