20190330-ununitialized-use-state-check.diff 502 B

123456789101112
  1. diff --git a/3rdparty/zlib/inflate.c b/3rdparty/zlib/inflate.c
  2. index ac333e8c2e..19a2cf2ed8 100644
  3. --- a/3rdparty/zlib/inflate.c
  4. +++ b/3rdparty/zlib/inflate.c
  5. @@ -228,6 +228,7 @@ int stream_size;
  6. state->strm = strm;
  7. state->window = Z_NULL;
  8. state->mode = HEAD; /* to pass state test in inflateReset2() */
  9. + state->check = 1L; /* 1L is the result of adler32() zero length data */
  10. ret = inflateReset2(strm, windowBits);
  11. if (ret != Z_OK) {
  12. ZFREE(strm, state);