Re: Unserialize bug in PHP 4.3.2RC4?

From: Date: Thu, 22 May 2003 22:37:30 +0000
Subject: Re: Unserialize bug in PHP 4.3.2RC4?
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-1916@lists.php.net to get a copy of this message
The .c mismatched the .re, I just committed a freshly generated var_unserializer.c so this should be fixed now. --Jani On Thu, 22 May 2003, Stanislav Malyshev wrote: >Strange thing - I saw this effect myself, but as soon as I have rebuilt >var_unserializer.c from var_unserializer.re, it works OK again... Maybe >just unclean CVS build or something? > >IS>> I'm testing PHP 4.3.2RC4 and i think i found a bug in unserialize function >IS>> If you run this script: >IS>> <?php >IS>> error_reporting (E_ALL); >IS>> $a = array(4); >IS>> $str = serialize($a); >IS>> print('Serialized array: '.$str."\n"); >IS>> $b = unserialize($str); >IS>> print('Unserialized array: '); >IS>> var_dump($b); >IS>> print("\n"); >IS>> $str = serialize(array(4.5)); >IS>> print('Serialized array: '.$str."\n"); >IS>> $b = unserialize($str); >IS>> print('Unserialized array: ') ; >IS>> var_dump($b); >IS>> print("\n"); >IS>> ?> >IS>> You should expect the second variable to contain an array with a single >IS>> floating value. >IS>> On my systems (Linux SuSE x86) i got this notice: >IS>> Notice: unserialize(): Error at offset 15 of 16 bytes in script-name.php on >IS>> line 12 >IS>> Result for unserialize() is "false" >IS>> Needless to say that on PHP 4.3.0 all run fine >IS>> Serializing/deserializing float var it's ok >IS>> >IS>> >IS>> >IS>> Iacopo Spalletti >IS>> i dot spalletti at iast dot it >IS>> >IS>> PGP key block: http://www.iast.it/pgp >IS>> >IS>> >IS>> > > -- <- For Sale! ->

« previous php.internals (#1916) next »