floIcon: set cap on image size

This commit is contained in:
Andrew Dolgov 2013-04-16 23:24:50 +04:00
parent 4fe9327491
commit cb50799560
1 changed files with 9 additions and 5 deletions

View File

@ -780,6 +780,10 @@ class floIconImage {
$this->_entryIconFormat = fread($filePointer, 16);
$this->_entry = unpack("CWidth/CHeight/CColorCount/CReserved/SPlanes/SBitCount/LSizeInBytes/LFileOffset", $this->_entryIconFormat);
// fox
if ($this->_entry["SizeInBytes"] > 16384)
$this->_entry["SizeInBytes"] = 16384;
// Position the file pointer.
fseek($filePointer, $this->_entry["FileOffset"]);