]> granicus.if.org Git - php/commitdiff
Fix bug #71936 (Segmentation fault destroying HTTP_RAW_POST_DATA)
authorRemi Collet <remi@php.net>
Mon, 20 Jun 2016 16:43:07 +0000 (18:43 +0200)
committerRemi Collet <remi@php.net>
Mon, 20 Jun 2016 16:43:07 +0000 (18:43 +0200)
NEWS
main/php_content_types.c

diff --git a/NEWS b/NEWS
index 91d190db1eece0fbe8adcbb4fe46f1a356da97a1..06e5bb7a8060cbe001a609e84234319ed61064d9 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,10 @@ PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2016, PHP 5.6.24
 
+- Core:
+  . Fix bug #71936 (Segmentation fault destroying HTTP_RAW_POST_DATA).
+    (mike dot laspina at gmail dot com, Remi)
+
 - bz2:
   . Fix bug #72447 (Type Confusion in php_bz2_filter_create()). (gogil at 
     stealien dot com).
index abc796db3c54e1a6b89248f0cd924470031d0af8..6d7d24dab8bad9c0e26bbe7bf51a6e62ba138761 100644 (file)
@@ -70,6 +70,9 @@ SAPI_API SAPI_POST_READER_FUNC(php_default_post_reader)
                                        (unsigned long) length, INT_MAX);
                                length = INT_MAX;
                        }
+                       if (!data) {
+                               data = STR_EMPTY_ALLOC();
+                       }
                        SET_VAR_STRINGL("HTTP_RAW_POST_DATA", data, length);
 
                        sapi_module.sapi_error(E_DEPRECATED,