1
0
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:
2016-07-23 23:50:43 -03:00
parent 4549549eec
commit a8091dfa7d
5 changed files with 50 additions and 21 deletions

View File

@@ -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;