Bug #75289 [Opn->Nab]: Unserialize ArrayIterator broken
| From: | nikic@php.net | Date: | Fri, 29 Sep 2017 19:50:23 +0000 |
| Subject: | Bug #75289 [Opn->Nab]: Unserialize ArrayIterator broken | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-211465@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75289&edit=1
ID: 75289
Updated by: nikic@php.net
Reported by: sp at feig-partner dot de
Summary: Unserialize ArrayIterator broken
-Status: Open
+Status: Not a bug
Type: Bug
Package: SPL related
Operating System: irrelevant
PHP Version: 7.1.10
Block user comment: N
Private report: N
New Comment:
serialize() output is binary data, and your method of copying the strings stripped the null bytes.
Trying the same after an application of bin2hex and hex2bin worked for me.
Previous Comments:
------------------------------------------------------------------------
[2017-09-29 19:34:42] sp at feig-partner dot de
Description:
------------
This is a followup to this bug:
https://bugs.php.net/bug.php?id=74669
While serialization and unserialization in the same run now works:
https://3v4l.org/6c4RU
it still fails, when you're serializing in one run and unserializing in another.
Take the serialized output from here:
https://3v4l.org/bNCbY#v560
and unserialize it separately:
https://3v4l.org/EcAWQ
Gives "Notice: unserialize(): Error at offset 45 of 193 bytes in /in/EcAWQ on line 47"
With the serialized output from php5 the result is the same:
https://3v4l.org/v5D2l
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75289&edit=1