diff options
author | Anton Blanchard <anton@samba.org> | 2015-07-06 09:41:09 +1000 |
---|---|---|
committer | Anton Blanchard <anton@samba.org> | 2015-07-06 10:13:00 +1000 |
commit | 275009d0bdece1cd9fe58ca34d1ab7586441ec30 (patch) | |
tree | 8dcabd0e1ece9beaa1239d585f67ea38dd4f5e90 /sapi/cli/php_http_parser.c | |
parent | a97f7644725fab6a6c3681b3062f40994a218cb6 (diff) | |
download | php-git-275009d0bdece1cd9fe58ca34d1ab7586441ec30.tar.gz |
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;
Diffstat (limited to 'sapi/cli/php_http_parser.c')
-rw-r--r-- | sapi/cli/php_http_parser.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sapi/cli/php_http_parser.c b/sapi/cli/php_http_parser.c index d289e80f70..aa9f28638f 100644 --- a/sapi/cli/php_http_parser.c +++ b/sapi/cli/php_http_parser.c @@ -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; |