1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-27 16:10:57 -05:00

fix(zlib): handle no flush flag in handle_.write (#21432)

Fixes https://github.com/denoland/deno/issues/21096
This commit is contained in:
Divy Srivastava 2023-12-13 22:28:56 +05:30 committed by GitHub
parent 10ab8c1ef1
commit 38002ffdd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View file

@ -81,3 +81,18 @@ Deno.test(
await promise;
},
);
Deno.test(
"zlib flush i32",
// FIXME: Handle is not closed properly
{ sanitizeResources: false },
function () {
const handle = createDeflate({
// @ts-expect-error: passing non-int flush value
flush: "",
});
handle.end();
handle.destroy();
},
);

View file

@ -120,7 +120,7 @@ class Zlib {
core.opAsync(
"op_zlib_write_async",
this.#handle,
flush,
flush ?? Z_NO_FLUSH,
input,
in_off,
in_len,