diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2021-07-28 07:36:07 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2021-07-28 07:36:07 +0000 |
commit | 799314f9b85c578626b274d579f79db37048ac20 (patch) | |
tree | f3eeeab1afefad2eb9c584567801e0b8d6e4a872 /sys | |
parent | 650befca653df0f1f840c662cb72a0d7d4485545 (diff) |
Fix previous: In one spot I incorrectly used Pos (unsigned short) where
I should have used Byte (unsigned char) which led to passing twice the
correct size to free.
Found & tested by bluhm with the sys/netinet/ipsec tests on i386.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/lib/libz/deflate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/lib/libz/deflate.c b/sys/lib/libz/deflate.c index 5c42b69ea5c..1f87e05186a 100644 --- a/sys/lib/libz/deflate.c +++ b/sys/lib/libz/deflate.c @@ -1,4 +1,4 @@ -/* $OpenBSD: deflate.c,v 1.5 2021/07/22 16:40:20 tb Exp $ */ +/* $OpenBSD: deflate.c,v 1.6 2021/07/28 07:36:06 tb Exp $ */ /* deflate.c -- compress data using the deflation algorithm * Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h @@ -1083,7 +1083,7 @@ int ZEXPORT deflateEnd (strm) TRY_FREE(strm, strm->state->pending_buf, strm->state->pending_buf_size); TRY_FREE(strm, strm->state->head, strm->state->hash_size * sizeof(Pos)); TRY_FREE(strm, strm->state->prev, strm->state->w_size * sizeof(Pos)); - TRY_FREE(strm, strm->state->window, strm->state->w_size * 2 * sizeof(Pos)); + TRY_FREE(strm, strm->state->window, strm->state->w_size * 2 * sizeof(Byte)); ZFREE(strm, strm->state, sizeof(deflate_state)); strm->state = Z_NULL; |