From 423c90d9feb3f18f5eb9469da0dd775d3f63c1e6 Mon Sep 17 00:00:00 2001 From: Cliff Frey Date: Wed, 18 Aug 2010 10:35:56 -0700 Subject: [PATCH] fixes for architectures with signed char default This could have resulted in memory before the normal_url_char array being read on architectures with signed char default. --- http_parser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/http_parser.c b/http_parser.c index c600ff1..c1a7b4f 100644 --- a/http_parser.c +++ b/http_parser.c @@ -1437,7 +1437,7 @@ size_t http_parser_execute (http_parser *parser, { assert(parser->flags & F_CHUNKED); - c = unhex[(int)ch]; + c = unhex[(unsigned char)ch]; if (c == -1) goto error; parser->content_length = c; state = s_chunk_size; @@ -1453,7 +1453,7 @@ size_t http_parser_execute (http_parser *parser, break; } - c = unhex[(int)ch]; + c = unhex[(unsigned char)ch]; if (c == -1) { if (ch == ';' || ch == ' ') {