Re: cvs: php4 /ext/standard var.c var_unserializer.c var_unserializer.re
| From: | Yasuo Ohgaki | Date: | Fri, 03 May 2002 01:23:14 +0000 |
| Subject: | Re: cvs: php4 /ext/standard var.c var_unserializer.c var_unserializer.re | ||
| References: | 1 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-5304@lists.php.net to get a copy of this message | ||
Stanislav Malyshev wrote:
stas Sun Apr 28 12:56:34 2002 EDTHi, it seems this patch trancate session variable. (I don't see the last session var) I wondered why my app does not work with latest PHP suddenly. Using var.c (1.140), var_unserializer.c (1.11) fixed problem. Derick, This problem must be addressed before 4.2.1. I haven't tested with 4.2.x source, but it's merged. -- Yasuo OhgakiModified files: /php4/ext/standard var.c var_unserializer.c var_unserializer.re Log:Fix couple of nasty serializer bugs:a) When array unserializer encounters less data than it expects (like: a:1:{}) it crashes. I don't understand exactly why it does, but the fact is it does. So now it should catch "}" and bail out. b) When array/object data are serialized, the count is written by hash count. However, it can be that in-loop check fails and less data thanexpected will then be written into the array. Which, due to a), would crash on unserialize. So now it will write empty entries in place of entries it cannot serialize (the other choice would be make two passes on the data, which I don't like).