1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

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

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