summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-10-02 00:07:41 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-10-02 09:35:37 +0200
commit01327600e3a9f0bd23383eb21ad7dcdc84a0c249 (patch)
treec4838c4e9dad60c70d05b74cdff199baaebb42be
parent3997b3e2a4bcf0023d277a74b6187cdad46533b2 (diff)
downloadcurl-01327600e3a9f0bd23383eb21ad7dcdc84a0c249.tar.gz
tool_setopt: escape binary data to hex, not octal
-rw-r--r--src/tool_setopt.c2
1 files changed, 1 insertions, 1 deletions
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