]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fixed inflateGetDictionary length check may include bytes added by last call to inflate.
authorNathan Moinvaziri <nathan@solidstatenetworks.com>
Thu, 28 Oct 2021 00:58:21 +0000 (17:58 -0700)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Thu, 2 Dec 2021 08:26:32 +0000 (09:26 +0100)
test/example.c

index 2a03328432bdeafa0353b369294110fdf14c05b1..6324a33c606657122df074081db4743ff451a10d 100644 (file)
@@ -551,7 +551,7 @@ void test_dict_inflate(unsigned char *compr, size_t comprLen, unsigned char *unc
     err = PREFIX(inflateGetDictionary)(&d_stream, NULL, &check_dictionary_len);
     CHECK_ERR(err, "inflateGetDictionary");
 #ifndef S390_DFLTCC_INFLATE
-    if (check_dictionary_len != sizeof(dictionary))
+    if (check_dictionary_len < sizeof(dictionary))
         error("bad dictionary length\n");
 #endif