summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-10-04 07:57:15 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-10-04 07:57:15 +0000
commita23a984ffa80681f8b76971e8380135ac5f0ebc3 (patch)
tree3eb9f3df4b3a64cc3da022bd0d70a90a089dfe98 /lib
parenta7d6a71c348c88e5b20dff2464f1870b7a6bdbf8 (diff)
set flag that we are restarting; pr 2886, also same diff found in netbsd;
how did this sit around so long??
Diffstat (limited to 'lib')
-rw-r--r--lib/libz/deflate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libz/deflate.c b/lib/libz/deflate.c
index c6d0de345bb..55f8324e13b 100644
--- a/lib/libz/deflate.c
+++ b/lib/libz/deflate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: deflate.c,v 1.6 2003/03/10 04:02:50 david Exp $ */
+/* $OpenBSD: deflate.c,v 1.7 2003/10/04 07:57:14 deraadt Exp $ */
/* deflate.c -- compress data using the deflation algorithm
* Copyright (C) 1995-2002 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
@@ -274,6 +274,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
s->pending_buf == Z_NULL) {
strm->msg = (char*)ERR_MSG(Z_MEM_ERROR);
+ s->status = INIT_STATE;
deflateEnd (strm);
return Z_MEM_ERROR;
}