diff options
author | lhchavez <lhchavez@lhchavez.com> | 2020-06-27 12:33:32 -0700 |
---|---|---|
committer | lhchavez <lhchavez@lhchavez.com> | 2020-06-30 06:25:10 -0700 |
commit | 3a197ea7ead1bc1b018eb809e92f418a00e5c3f8 (patch) | |
tree | 782324566a568dc45ff7ee7599eafa48a8f2442e /deps | |
parent | d6c62852076005053be9169cb4f3cd9cf9db2aea (diff) | |
download | libgit2-3a197ea7ead1bc1b018eb809e92f418a00e5c3f8.tar.gz |
Make the tests pass cleanly with MemorySanitizer
This change:
* Initializes a few variables that were being read before being
initialized.
* Includes https://github.com/madler/zlib/pull/393. As such,
it only works reliably with `-DUSE_BUNDLED_ZLIB=ON`.
Diffstat (limited to 'deps')
-rw-r--r-- | deps/zlib/deflate.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/deps/zlib/deflate.c b/deps/zlib/deflate.c index 1ec761448..8d44869e6 100644 --- a/deps/zlib/deflate.c +++ b/deps/zlib/deflate.c @@ -320,6 +320,7 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy, s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte)); s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos)); + memset(s->prev, 0, s->w_size * sizeof(Pos)); s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos)); s->high_water = 0; /* nothing written to s->window yet */ |