Source: mtools
Version: 4.0.18-2
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: randomness toolchain
X-Debbugs-Cc: [email protected]

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed
that mtools generates non-determinstic output.

This is due to it writing uninitialised memory in the extension part
of DOS-style "8.3" filenames.

Patch attached.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [email protected] / chris-lamb.co.uk
       `-
diff --git a/direntry.c b/direntry.c
index c1d2ddd..284d0ae 100644
--- a/direntry.c
+++ b/direntry.c
@@ -24,6 +24,7 @@
 
 void initializeDirentry(direntry_t *entry, Stream_t *Dir)
 {
+       memset(entry, 0, sizeof(direntry_t));
        entry->entry = -1;
 /*     entry->parent = getDirentry(Dir);*/
        entry->Dir = Dir;

Reply via email to