php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59107 Date read from amf as double not int64
Submitted: 2010-03-10 10:53 UTC Modified: 2017-04-01 19:22 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: ssufficool at gmail dot com Assigned:
Status: Wont fix Package: amfext (PECL)
PHP Version: Irrelevant OS: Ubuntu Linux 9.10
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: ssufficool at gmail dot com
New email:
PHP Version: OS:

 

 [2010-03-10 10:53 UTC] ssufficool at gmail dot com
Description:
------------
teh serialized date is read from an AMF stream as a double and then re-ordered as big endian instead of being read as an int64 per the spec. The double is unusable in PHP as a date anyhow.

Reproduce code:
---------------
$amf = amf_decode($amfstream);
echo $amf['date'];

Expected result:
----------------
An integer or double value that is usable in PHP

Actual result:
--------------
3.123456789E-306

--- SOLUTION?  ---
For PHP5.x read the int64, convert from milliseconds to seconds and return as ZVAL_LONG with a big fat note of the precision loss.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-01 19:22 UTC] tpunt@php.net
-Status: Open +Status: Wont fix
 [2017-04-01 19:22 UTC] tpunt@php.net
Due to this extension not seeing any activity since 2010, this issue will not be fixed. We are therefore closing this now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 20:01:45 2024 UTC