From 01327600e3a9f0bd23383eb21ad7dcdc84a0c249 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 2 Oct 2020 00:07:41 +0200 Subject: [PATCH] tool_setopt: escape binary data to hex, not octal --- src/tool_setopt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tool_setopt.c b/src/tool_setopt.c index ea23e9386..02f305729 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