From 1b4570b79fa9810b171d3fb074c405f2f429ecad Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 20 Jun 2016 18:43:07 +0200 Subject: [PATCH] Fix bug #71936 (Segmentation fault destroying HTTP_RAW_POST_DATA) --- NEWS | 4 ++++ main/php_content_types.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/NEWS b/NEWS index 91d190db1e..06e5bb7a80 100644 --- 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). diff --git a/main/php_content_types.c b/main/php_content_types.c index abc796db3c..6d7d24dab8 100644 --- a/main/php_content_types.c +++ b/main/php_content_types.c @@ -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, -- 2.50.1