Permalink
Browse files

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.
  • Loading branch information...
1 parent c1d48fd commit 423c90d9feb3f18f5eb9469da0dd775d3f63c1e6 Cliff Frey committed with ry Aug 18, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 http_parser.c
View
@@ -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 == ' ') {

0 comments on commit 423c90d

Please sign in to comment.