summaryrefslogtreecommitdiff
path: root/core/inflator.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/inflator.js')
-rw-r--r--core/inflator.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/inflator.js b/core/inflator.js
index 726600f..39db447 100644
--- a/core/inflator.js
+++ b/core/inflator.js
@@ -35,7 +35,10 @@ export default class Inflate {
this.strm.avail_out = this.chunkSize;
- inflate(this.strm, 0); // Flush argument not used.
+ let ret = inflate(this.strm, 0); // Flush argument not used.
+ if (ret < 0) {
+ throw new Error("zlib inflate failed");
+ }
if (this.strm.next_out != expected) {
throw new Error("Incomplete zlib block");