Opened 15 years ago
Closed 15 years ago
#6581 closed defect (fixed)
PHP web API integer overflow with timestamp returning functions
Reported by: | Sm0k1n | Owned by: | |
---|---|---|---|
Component: | webservices | Version: | VirtualBox 3.1.6 |
Keywords: | php, time, integer, overflow | Cc: | |
Guest type: | other | Host type: | other |
Description
I have so far found three occurences of an integer overflow when dealing with timestamps.
IHost::UTCTime IRemoteDisplayInfo::beginTime IRemoteDisplayInfo::endTime
From the vboxServiceWrappers.php file I can see that the results from the methods are cast to an integer and PHP can't store an integer that big so the wrong time is returned. Fixing it is as simple as casting the results to float rather than int.
Change History (2)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Should be fixed in 3.1.8 / 3.2
See http://www.virtualbox.org/browser/trunk/src/VBox/Main/webservice/types.txt for types chosen for various XIDL values. Have changed large integers to floats as per php documentation.