]> granicus.if.org Git - php/commitdiff
MFH: fix #40998 (long session array keys are truncated)
authorAntony Dovgal <tony2001@php.net>
Wed, 4 Apr 2007 19:52:19 +0000 (19:52 +0000)
committerAntony Dovgal <tony2001@php.net>
Wed, 4 Apr 2007 19:52:19 +0000 (19:52 +0000)
NEWS
ext/session/session.c

diff --git a/NEWS b/NEWS
index efc0362429bdb2477f2b926f9552c8f343852014..58d1c9d733554c82a8bf19ab4f3eed4ba8687d2b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -37,6 +37,7 @@ PHP                                                                        NEWS
 - Fixed zend_llist_remove_tail (Michael Wallner, Dmitry)
 - Fixed a thread safety issue in gd gif read code (Nuno, Roman Nemecek)
 - Fixed CVE-2007-1001, GD wbmp used with invalid image size (Pierre)
+- Fixed bug #40998 (long session array keys are truncated). (Tony)
 - Fixed bug #40921 (php_default_post_reader crashes when post_max_size is
   exceeded). (trickie at gmail dot com, Ilia)
 - Fixed bug #40915 (addcslashes unexpected behavior with binary input). (Tony)
index 72606a22d9aea484000d499319305494c55cac88..cdb23ff2efa49479574d97e2f3d3623c7d8982c1 100644 (file)
@@ -523,7 +523,7 @@ PS_SERIALIZER_ENCODE_FUNC(php)
        PHP_VAR_SERIALIZE_INIT(var_hash);
 
        PS_ENCODE_LOOP(
-                       smart_str_appendl(&buf, key, (unsigned char) key_length);
+                       smart_str_appendl(&buf, key, key_length);
                        if (memchr(key, PS_DELIMITER, key_length)) {
                                PHP_VAR_SERIALIZE_DESTROY(var_hash);
                                smart_str_free(&buf);