Fix bug with convert int
Some bugged file have $data less from four bytes. This fix append zero bytes if it happens. It is prevent errors on access to need indexes.
This commit is contained in:
parent
5a3e2435c3
commit
102c19356f
@ -302,6 +302,11 @@ class OLERead
|
|||||||
*/
|
*/
|
||||||
private static function getInt4d($data, $pos)
|
private static function getInt4d($data, $pos)
|
||||||
{
|
{
|
||||||
|
$len = strlen($data);
|
||||||
|
if ($len < $pos + 4) {
|
||||||
|
$data .= str_repeat("\0", $pos + 4 - $len);
|
||||||
|
}
|
||||||
|
|
||||||
// FIX: represent numbers correctly on 64-bit system
|
// FIX: represent numbers correctly on 64-bit system
|
||||||
// http://sourceforge.net/tracker/index.php?func=detail&aid=1487372&group_id=99160&atid=623334
|
// http://sourceforge.net/tracker/index.php?func=detail&aid=1487372&group_id=99160&atid=623334
|
||||||
// Hacked by Andreas Rehm 2006 to ensure correct result of the <<24 block on 32 and 64bit systems
|
// Hacked by Andreas Rehm 2006 to ensure correct result of the <<24 block on 32 and 64bit systems
|
||||||
|
Loading…
Reference in New Issue
Block a user