mirror of
https://github.com/Rogiel/php-mpq
synced 2025-12-09 17:52:46 +00:00
Fix a memory leak issue and a problem parsing MPQ26 headers
This commit is contained in:
@@ -49,7 +49,7 @@ class DeflateCompression implements Compression {
|
||||
*/
|
||||
public function decompress($data, $length) {
|
||||
$output = @gzinflate(substr($data, 0, $length), $length);
|
||||
if(!is_string($output)) {
|
||||
if($output === false) {
|
||||
throw new InvalidInputDataException('The decompression input data is invalid.', $output);
|
||||
}
|
||||
return $output;
|
||||
|
||||
Reference in New Issue
Block a user