cvs: /php4 ChangeLog php_content_types.c
| From: | Thies C. Arntzen | Date: | Thu, 07 Oct 1999 09:14:10 +0000 |
| Subject: | cvs: /php4 ChangeLog php_content_types.c | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-5263@lists.php.net to get a copy of this message | ||
thies Thu Oct 7 05:14:10 1999 EDT
Modified files:
/php4 ChangeLog php_content_types.c
Log:
SET_VAR_STR* expect a emalloc'ed copy of the string!
Index: php4/ChangeLog
diff -u php4/ChangeLog:1.172 php4/ChangeLog:1.173
--- php4/ChangeLog:1.172 Wed Oct 6 11:09:44 1999
+++ php4/ChangeLog Thu Oct 7 05:13:39 1999
@@ -3,6 +3,7 @@
?? ?? 1999, Version 4.0 Beta 3
+- Fixed crash in HTTP_RAW_POST_DATA handling (Thies)
- You can use resources as array-indices again (Thies, Zend library)
- Fixed pg_fetch_array() with three arguments (Sascha)
Patch submitted by: brian@soda.berkeley.edu
Index: php4/php_content_types.c
diff -u php4/php_content_types.c:1.2 php4/php_content_types.c:1.3
--- php4/php_content_types.c:1.2 Thu Sep 16 19:18:15 1999
+++ php4/php_content_types.c Thu Oct 7 05:13:39 1999
@@ -10,10 +10,12 @@
SAPI_POST_READER_FUNC(php_default_post_reader)
{
+ char *data;
ELS_FETCH();
sapi_read_standard_form_data(content_type_dup SLS_CC);
- SET_VAR_STRINGL("HTTP_RAW_POST_DATA", SG(request_info).post_data,
SG(request_info).post_data_length);
+ data = estrndup(SG(request_info).post_data,SG(request_info).post_data_length);
+ SET_VAR_STRINGL("HTTP_RAW_POST_DATA", data, SG(request_info).post_data_length);
}