tools: squashfs3-lzma: generate reproducible output
authorDaniel Golle <daniel@makrotopia.org>
Fri, 12 May 2023 00:17:21 +0000 (02:17 +0200)
committerDaniel Golle <daniel@makrotopia.org>
Fri, 12 May 2023 00:27:17 +0000 (02:27 +0200)
Always initialize header with zeros as otherwise we may end up with
uninitialized memory which ruins reproducibility.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
tools/squashfs3-lzma/patches/150-fix-unitialized-memory.patch [new file with mode: 0644]

diff --git a/tools/squashfs3-lzma/patches/150-fix-unitialized-memory.patch b/tools/squashfs3-lzma/patches/150-fix-unitialized-memory.patch
new file mode 100644 (file)
index 0000000..ad3b820
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/squashfs-tools/mksquashfs.c
++++ b/squashfs-tools/mksquashfs.c
+@@ -1822,7 +1822,7 @@ int main(int argc, char *argv[])
+ {
+       struct stat buf, source_buf;
+       int i;
+-      squashfs_super_block sBlk;
++      squashfs_super_block sBlk = {};
+       char *b, *root_name = NULL;
+       int be, nopad = FALSE, keep_as_directory = FALSE, orig_be;
+       squashfs_inode inode;