From: Maksim Stsepanenka Date: Fri, 2 Oct 2015 06:43:57 +0000 (-0400) Subject: tool_setopt: fix c_escape truncated octal X-Git-Tag: curl-7_45_0~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2eb4f5efe9998b9eb0eda94beb713e89d20fb342;p=curl tool_setopt: fix c_escape truncated octal Closes https://github.com/bagder/curl/pull/469 --- diff --git a/src/tool_setopt.c b/src/tool_setopt.c index 7eb64b039..2ed68e5eb 100644 --- a/src/tool_setopt.c +++ b/src/tool_setopt.c @@ -227,7 +227,7 @@ static char *c_escape(const char *str) e += 2; } else if(! isprint(c)) { - snprintf(e, 4, "\\%03o", c); + snprintf(e, 5, "\\%03o", (unsigned)c); e += 4; } else