summaryrefslogtreecommitdiff
path: root/gzwrite.c
diff options
context:
space:
mode:
authorNathan Moinvaziri <nathan@nathanm.com>2019-07-16 20:00:33 -0700
committerHans Kristian Rosbach <hk-github@circlestorm.org>2019-07-18 11:58:04 +0200
commit2f56596da84535f0c0967090d6cda7946a47388f (patch)
tree4bf2cf759c04038b32ca680a52a3db04454f7c99 /gzwrite.c
parentd8b67f56e78fc2f897dba5a7278e268af6e61a3b (diff)
Fixed use of uninitialized value found by memory sanitizer and reported by @sebpop.
Diffstat (limited to 'gzwrite.c')
-rw-r--r--gzwrite.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gzwrite.c b/gzwrite.c
index 20e1d5c..5b12805 100644
--- a/gzwrite.c
+++ b/gzwrite.c
@@ -26,6 +26,7 @@ static int gz_init(gz_state *state) {
gz_error(state, Z_MEM_ERROR, "out of memory");
return -1;
}
+ memset(state->in, 0, state->want << 1);
/* only need output buffer and deflate state if compressing */
if (!state->direct) {