1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-16 06:25:03 -05:00

tool_setopt: escape binary data to hex, not octal

This commit is contained in:
Daniel Stenberg 2020-10-02 00:07:41 +02:00
parent 3997b3e2a4
commit 01327600e3
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View 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