1
0
mirror of https://github.com/kasmtech/KasmVNC.git synced 2025-08-15 10:48:58 +02:00

Handle errors from zlib/pako

This commit is contained in:
Niko Lehto
2020-02-03 10:04:20 +01:00
committed by Lauri Kasanen
parent b690ae4c2d
commit dbe2930758

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