tool_setopt: fix c_escape truncated octal

Closes https://github.com/bagder/curl/pull/469
This commit is contained in:
Maksim Stsepanenka 2015-10-02 02:43:57 -04:00 committed by Jay Satiro
parent 5bf36ea30d
commit 2eb4f5efe9
1 changed files with 1 additions and 1 deletions

View File

@ -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