From 275009d0bdece1cd9fe58ca34d1ab7586441ec30 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Mon, 6 Jul 2015 09:41:09 +1000 Subject: [PATCH] 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; --- sapi/cli/php_http_parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.40.0