]> granicus.if.org Git - php/commitdiff
Fixed bug #70295 (Segmentation fault with setrawcookie)
authorBob Weinand <bobwei9@hotmail.com>
Tue, 18 Aug 2015 23:33:19 +0000 (01:33 +0200)
committerBob Weinand <bobwei9@hotmail.com>
Tue, 18 Aug 2015 23:33:19 +0000 (01:33 +0200)
NEWS
ext/standard/head.c

diff --git a/NEWS b/NEWS
index 39c2f3665f7bed55818e8b1a5bfc0ec7fcfadda3..a495f10a34f2fdccb27daae0f4f2ca42229aeb09 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,9 @@ PHP                                                                        NEWS
 - Core:
   . Fixed bug causing exception traces with anon classes to be truncated. (Bob)
 
+- Standard:
+  . Fixed bug #70295 (Segmentation fault with setrawcookie). (Bob)
+
 20 Aug 2015, PHP 7.0.0 RC 1
 
 - Core:
index 5a53ae2d509f9f111f4a1fe4afdb8424408676d0..215089b8a1bf0e85f0e27bd50cbdba2f196d0f7e 100644 (file)
@@ -141,7 +141,7 @@ PHPAPI int php_setcookie(zend_string *name, zend_string *value, time_t expires,
                        if (!p || *(p + 5) != ' ') {
                                zend_string_free(dt);
                                efree(cookie);
-                               zend_string_free(encoded_value);
+                               zend_string_release(encoded_value);
                                zend_error(E_WARNING, "Expiry date cannot have a year greater than 9999");
                                return FAILURE;
                        }
@@ -155,7 +155,7 @@ PHPAPI int php_setcookie(zend_string *name, zend_string *value, time_t expires,
        }
 
        if (encoded_value) {
-               zend_string_free(encoded_value);
+               zend_string_release(encoded_value);
        }
 
        if (path && ZSTR_LEN(path)) {