com php-src: http parser code assumes char is signed: sapi/cli/php_http_parser.c

From: Date: Mon, 06 Jul 2015 00:13:00 +0000
Subject: com php-src: http parser code assumes char is signed: sapi/cli/php_http_parser.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-87755@lists.php.net to get a copy of this message
Commit: 275009d0bdece1cd9fe58ca34d1ab7586441ec30 Author: Anton Blanchard <anton@samba.org> Mon, 6 Jul 2015 09:41:09 +1000 Parents: a97f7644725fab6a6c3681b3062f40994a218cb6 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=275009d0bdece1cd9fe58ca34d1ab7586441ec30 Log: 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; Changed paths: M sapi/cli/php_http_parser.c Diff: diff --git a/sapi/cli/php_http_parser.c b/sapi/cli/php_http_parser.c index d289e80..aa9f286 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;

« previous php.cvs (#87755) next »