]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
made initialize out char array with all elements set to 0
authorAlex Murkoff <413x1nkp@gmail.com>
Sun, 14 Apr 2024 10:45:53 +0000 (17:45 +0700)
committerAlex Murkoff <413x1nkp@gmail.com>
Sun, 14 Apr 2024 10:45:53 +0000 (17:45 +0700)
fixed where i made it to init with just the first one being set to 0

zlibWrapper/examples/minigzip.c

index a065542125d568e75b1339186049922101597259..c4ce5f479bfbf589d3b60be141b0f941f7ccf728 100644 (file)
@@ -234,7 +234,7 @@ int gzwrite _Z_OF((gzFile, const void *, unsigned));
 
 int gzwrite(gzFile gz, const void *buf, unsigned len) {
     z_stream *strm;
-    unsigned char out[BUFLEN] = 0;
+    unsigned char out[BUFLEN] = { 0 };
 
     if (gz == NULL || !gz->write)
         return 0;