X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=php_http_message_parser.c;h=319f089ab6d7b7865eac94df566438e950ddadb0;hb=cdfa5298b064787eebbdce77a46b5ae77b3617ae;hp=4162e3710cf060f027840bf92a16a4524de54803;hpb=5389d7b1cc701efea82a2c6cbb1cc1b234f705e3;p=m6w6%2Fext-http diff --git a/php_http_message_parser.c b/php_http_message_parser.c index 4162e37..319f089 100644 --- a/php_http_message_parser.c +++ b/php_http_message_parser.c @@ -213,7 +213,7 @@ PHP_HTTP_API php_http_message_parser_state_t php_http_message_parser_parse(php_h { unsigned header_parser_flags = (flags & PHP_HTTP_MESSAGE_PARSER_CLEANUP) ? PHP_HTTP_HEADER_PARSER_CLEANUP : 0; - switch (php_http_header_parser_parse(&parser->header, buffer, header_parser_flags, &(*message)->hdrs, (php_http_info_callback_t) php_http_message_info_callback, message)) { + switch (php_http_header_parser_parse(&parser->header, buffer, header_parser_flags, *message ? &(*message)->hdrs : NULL, (php_http_info_callback_t) php_http_message_info_callback, message)) { case PHP_HTTP_HEADER_PARSER_STATE_FAILURE: return PHP_HTTP_MESSAGE_PARSER_STATE_FAILURE;