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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
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-2020 The PHP Group
All rights reserved.
Last updated: Mon Jan 27 21:01:23 2020 UTC