mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-13 01:03:25 +00:00
ebaefe3b6b
Sorry, mishap from my rebase I assume, since they were original part of the version bump to 1.2.12.
28 lines
800 B
Diff
28 lines
800 B
Diff
From 4346a16853e19b45787ce933666026903fb8f3f8 Mon Sep 17 00:00:00 2001
|
|
From: Mark Adler <madler@alumni.caltech.edu>
|
|
Date: Tue, 17 Apr 2018 22:44:41 -0700
|
|
Subject: [PATCH 2/2] Assure that the number of bits for deflatePrime() is
|
|
valid.
|
|
|
|
---
|
|
deflate.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/deflate.c b/deflate.c
|
|
index 19cba87..23aef18 100644
|
|
--- a/deflate.c
|
|
+++ b/deflate.c
|
|
@@ -589,7 +589,8 @@ int ZEXPORT deflatePrime (strm, bits, value)
|
|
|
|
if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
|
|
s = strm->state;
|
|
- if (s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3))
|
|
+ if (bits < 0 || bits > 16 ||
|
|
+ s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3))
|
|
return Z_BUF_ERROR;
|
|
do {
|
|
put = Buf_size - s->bi_valid;
|
|
--
|
|
2.33.1
|
|
|