From: Nathan Moinvaziri Date: Thu, 28 Oct 2021 00:58:21 +0000 (-0700) Subject: Fixed inflateGetDictionary length check may include bytes added by last call to inflate. X-Git-Tag: 2.1.0-beta1~489 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d87543910abc7fad7097a29c052aac6e6860f792;p=thirdparty%2Fzlib-ng.git Fixed inflateGetDictionary length check may include bytes added by last call to inflate. --- diff --git a/test/example.c b/test/example.c index 2a0332843..6324a33c6 100644 --- a/test/example.c +++ b/test/example.c @@ -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