http parser code assumes char is signed

A char can be either signed or unsigned, and on PowerPC and ARM it is
unsigned. The following code will always be false on these architectures:

        if (c == -1) goto error;
This commit is contained in:
Anton Blanchard 2015-07-06 09:41:09 +10:00
parent a97f764472
commit 275009d0bd

View File

@ -326,7 +326,8 @@ size_t php_http_parser_execute (php_http_parser *parser,
const char *data,
size_t len)
{
char c, ch;
char ch;
signed char c;
const char *p = data, *pe;
size_t to_read;