php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59933 problem in dbus.c:1860
Submitted: 2011-09-02 07:41 UTC Modified: 2017-10-24 07:57 UTC
From: chenwen at fiberlogic dot com Assigned:
Status: Open Package: DBus (PECL)
PHP Version: 5.2.17 OS: linux
Private report: No CVE-ID: None
 [2011-09-02 07:41 UTC] chenwen at fiberlogic dot com
Description:
------------
In dbus.c:1860
I suggest that we should use char stat[8]  instead of 
dbus_int64_t stat.
Just like dbus document says: "On some really obscure 
platforms dbus_uint64_t might not exist"

This code was broken in my MIPS(BE) machine.

ref:
http://dbus.freedesktop.org/doc/api/html/group__DBusMessage.h
tml#ga41c23a05e552d0574d0444d4693d18ab


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-09-06 08:39 UTC] yc_huang at fiberlogic dot com
The key point is not using char[8] or dbus_int64_t to store. It should do type casting by pointer way rather than type casting directly to avoid the endian problem.

Here is a patch can work well on mips, x86 and x64 platform:
http://codepad.org/8hp25Mfo
 [2011-10-12 21:27 UTC] felipe@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: derick
 [2017-10-24 07:57 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: derick +Assigned To:
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 05:01:30 2024 UTC