From b11b5a0b5d121f6a40a14a4d7595f4ff7f9ed7eb Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 19 Mar 2011 01:16:21 +1100 Subject: [PATCH] Need to memset magic to zero to prevent garbage beign written to fields not written. --- lrzip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lrzip.c b/lrzip.c index 75ac8b8..bb8124e 100644 --- a/lrzip.c +++ b/lrzip.c @@ -65,6 +65,7 @@ void write_magic(rzip_control *control) { char magic[MAGIC_LEN]; + memset(magic, 0, MAGIC_LEN); strcpy(magic, "LRZI"); magic[4] = LRZIP_MAJOR_VERSION; magic[5] = LRZIP_MINOR_VERSION;