Skip to content
Snippets Groups Projects
Commit ffc099b8 authored by Fredrik Hübinette (Hubbe)'s avatar Fredrik Hübinette (Hubbe)
Browse files

bugfix in Gz.deflate

Rev: src/modules/Gz/testsuite.in:1.9
Rev: src/modules/Gz/zlibmod.c:1.26
parent 1e577b80
No related branches found
No related tags found
No related merge requests found
// $Id: testsuite.in,v 1.8 1999/06/24 23:55:01 hubbe Exp $ // $Id: testsuite.in,v 1.9 1999/07/15 16:58:43 hubbe Exp $
cond([[ master()->resolv("Gz")->deflate ]], cond([[ master()->resolv("Gz")->deflate ]],
[[ [[
...@@ -25,8 +25,6 @@ cond([[ master()->resolv("Gz")->deflate && master()->resolv("Crypto") && master ...@@ -25,8 +25,6 @@ cond([[ master()->resolv("Gz")->deflate && master()->resolv("Crypto") && master
[[ [[
dotest(Crypto.randomness.pike_random()->read(32768)) dotest(Crypto.randomness.pike_random()->read(32768))
dnl These two causes 'out of memory' errors /Hubbe dotest(Crypto.randomness.pike_random()->read(524288))
dnl dotest(Crypto.randomness.pike_random()->read(8388608))
dnl dotest(Crypto.randomness.pike_random()->read(524288))
dnl dotest(Crypto.randomness.pike_random()->read(8388608))
]]) ]])
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
||| See the files COPYING and DISCLAIMER for more information. ||| See the files COPYING and DISCLAIMER for more information.
\*/ \*/
#include "global.h" #include "global.h"
RCSID("$Id: zlibmod.c,v 1.25 1999/06/10 20:44:12 hubbe Exp $"); RCSID("$Id: zlibmod.c,v 1.26 1999/07/15 16:58:44 hubbe Exp $");
#include "zlib_machine.h" #include "zlib_machine.h"
...@@ -114,6 +114,9 @@ static int do_deflate(dynamic_buffer *buf, ...@@ -114,6 +114,9 @@ static int do_deflate(dynamic_buffer *buf,
ret=deflate(& this->gz, flush); ret=deflate(& this->gz, flush);
THREADS_DISALLOW(); THREADS_DISALLOW();
/* Absorb any unused space /Hubbe */
low_make_buf_space(-this->gz.avail_out,buf);
/* we don't care about Z_BUF_ERROR here; it won't happen. */ /* we don't care about Z_BUF_ERROR here; it won't happen. */
} }
while (ret==Z_OK && flush==Z_FINISH); while (ret==Z_OK && flush==Z_FINISH);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment