]> granicus.if.org Git - php/commitdiff
Pass on nul'ified data
authorSascha Schumann <sas@php.net>
Fri, 3 Aug 2001 10:39:48 +0000 (10:39 +0000)
committerSascha Schumann <sas@php.net>
Fri, 3 Aug 2001 10:39:48 +0000 (10:39 +0000)
ext/session/session.c

index 6b32d94a864c681c6cc9140084056ba38e63958c..7fe32677c587de9347fc32ee64a301f91b9e599e 100644 (file)
@@ -296,6 +296,8 @@ PS_SERIALIZER_ENCODE_FUNC(php_binary)
                        smart_str_appendc(&buf, (unsigned char) (key_length & PS_BIN_UNDEF));
                        smart_str_appendl(&buf, key, key_length);
        );
+       
+       smart_str_0(&buf);
 
        if (newlen) *newlen = buf.len;
        *newstr = buf.c;
@@ -363,6 +365,8 @@ PS_SERIALIZER_ENCODE_FUNC(php)
                        smart_str_appendl(&buf, key, key_length);
                        smart_str_appendc(&buf, PS_DELIMITER);
        );
+       
+       smart_str_0(&buf);
 
        if (newlen) *newlen = buf.len;
        *newstr = buf.c;