summaryrefslogtreecommitdiff
path: root/core/inflator.js
diff options
context:
space:
mode:
Diffstat (limited to 'core/inflator.js')
-rw-r--r--core/inflator.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/inflator.js b/core/inflator.js
index b7af040..726600f 100644
--- a/core/inflator.js
+++ b/core/inflator.js
@@ -37,6 +37,10 @@ export default class Inflate {
inflate(this.strm, 0); // Flush argument not used.
+ if (this.strm.next_out != expected) {
+ throw new Error("Incomplete zlib block");
+ }
+
return new Uint8Array(this.strm.output.buffer, 0, this.strm.next_out);
}