php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68536 pack for 64bits integer is broken on bigendian
Submitted: 2014-12-02 07:37 UTC Modified: 2014-12-02 07:40 UTC
From: remi@php.net Assigned: remi (profile)
Status: Closed Package: Strings related
PHP Version: 5.6.4RC1 OS: GNU/LInux bigendian
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: remi@php.net
New email:
PHP Version: OS:

 

 [2014-12-02 07:37 UTC] remi@php.net
Description:
------------
Pack doesn't produce correct output for 64bits integer


Test script:
---------------
php -r 'print_r(pack("Q", 0xfffffffffffe));' | hexdump -C


Expected result:
----------------
00000000  00 00 ff ff ff ff ff fe                           |........|
00000008


Actual result:
--------------
00000000  ff ff ff fe 00 00 00 00                           |........|
00000008


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-12-02 07:37 UTC] remi@php.net
-Assigned To: +Assigned To: remi
 [2014-12-02 07:40 UTC] remi@php.net
-Summary: Pack is broken +Summary: pack for 64bits integer is broken on bigendian
 [2014-12-02 07:41 UTC] remi@php.net
Automatic comment on behalf of remi
Revision: http://git.php.net/?p=php-src.git;a=commit;h=6f3714a8fcdd0dd1831f1c165fe723f5cc238769
Log: Fix Bug #68536 Pack for 64bits integer is broken on bigendian.
 [2014-12-02 07:41 UTC] remi@php.net
-Status: Assigned +Status: Closed
 [2014-12-05 07:00 UTC] ab@php.net
Automatic comment on behalf of remi
Revision: http://git.php.net/?p=php-src.git;a=commit;h=6f3714a8fcdd0dd1831f1c165fe723f5cc238769
Log: Fix Bug #68536 Pack for 64bits integer is broken on bigendian.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 17:01:28 2024 UTC