From 2eb4f5efe9998b9eb0eda94beb713e89d20fb342 Mon Sep 17 00:00:00 2001 From: Maksim Stsepanenka Date: Fri, 2 Oct 2015 02:43:57 -0400 Subject: tool_setopt: fix c_escape truncated octal Closes https://github.com/bagder/curl/pull/469 --- src/tool_setopt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3