]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_setopt: escape binary data to hex, not octal
authorDaniel Stenberg <daniel@haxx.se>
Thu, 1 Oct 2020 22:07:41 +0000 (00:07 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 2 Oct 2020 07:35:37 +0000 (09:35 +0200)
src/tool_setopt.c

index ea23e9386eae8faf581c2c7673f2ce8ebde828c1..02f30572954bf99a40ec40585c27a9b651731df7 100644 (file)
@@ -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