ID:               42196
 Updated by:       [EMAIL PROTECTED]
 Reported By:      joungkyun at gmail dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Output Control
 Operating System: Linux
 PHP Version:      5CVS-2007-08-03 (CVS)
 New Comment:

First of all, exactly why do you pass data like this between machines?
Secondly: OF course you can't pass huge integers to 32bit system. So 
this is expected behaviour. What do you suggest happens in this case?

Try this on 32bit system: 

echo (int) 4294967297;



Previous Comments:
------------------------------------------------------------------------

[2007-08-03 09:51:46] joungkyun at gmail dot com

Description:
------------
There is serialized data that made with 64bit integer on 64 bit
system.

On 32bit machine, if unserialize this data, you have result of integer
overflow.


Reproduce code:
---------------
On, 64bit system

echo serialize (4294967296 + 1);

=> result : "i:4294967297;"

On, 32bit system

echo unserilaize ("i:4294967297;");

=> result : 1

Expected result:
----------------
On, 32bit system

echo unserilaize ("i:4294967297;");

=> result : 4294967297

Actual result:
--------------
On, 32bit system

echo unserilaize ("i:4294967297;");

=> result : 1


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=42196&edit=1

Reply via email to