mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 779694 - Handle zlib errors correctly. r=jorendorff
This commit is contained in:
parent
c07fc94e51
commit
8a6a085f31
@ -0,0 +1,6 @@
|
||||
var x = "";
|
||||
for (var i=0; i<400; ++i) {
|
||||
x += String.fromCharCode(i * 289);
|
||||
}
|
||||
var s = "'" + x + "'";
|
||||
assertEq(Function("evt", s).toString(), "function anonymous(evt) {\n" + s + "\n}");
|
@ -67,7 +67,11 @@ Compressor::compressMore()
|
||||
else if (zs.avail_in == 0)
|
||||
zs.avail_in = CHUNKSIZE;
|
||||
int ret = deflate(&zs, done ? Z_FINISH : Z_NO_FLUSH);
|
||||
if (ret == Z_BUF_ERROR) {
|
||||
if (ret == Z_MEM_ERROR) {
|
||||
zs.avail_out = 0;
|
||||
return false;
|
||||
}
|
||||
if (ret == Z_BUF_ERROR || (done && ret == Z_OK)) {
|
||||
JS_ASSERT(zs.avail_out == 0);
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user