- avoid read beyond buffer
authorMichael Wallner <mike@php.net>
Wed, 14 Dec 2005 22:12:48 +0000 (22:12 +0000)
committerMichael Wallner <mike@php.net>
Wed, 14 Dec 2005 22:12:48 +0000 (22:12 +0000)
http_message_api.c

index 2a7a1ebbe6bc7ce7ab83672c52ac1bce2d98554e..6641f5df897d1fd5ec654879a24ca958705835d3 100644 (file)
@@ -288,7 +288,7 @@ PHP_HTTP_API http_message *_http_message_parse_ex(http_message *msg, const char
 #endif /* HTTP_HAVE_ZLIB || HAVE_ZLIB */
 
                /* check for following messages */
-               if (continue_at) {
+               if (continue_at && (continue_at < (message + message_length))) {
                        while (isspace(*continue_at)) ++continue_at;
                        if (continue_at < (message + message_length)) {
                                http_message *next = NULL, *most = NULL;