summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/mtools-mformat-uninitialized.patch
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-05-01 23:11:41 +0200
committerMarius Bakke <mbakke@fastmail.com>2019-05-01 23:11:41 +0200
commit3b458d5462e6bbd852c2dc5c6670d5655abf53f5 (patch)
tree4f3ccec0de1c355134369333c17e948e3258d546 /gnu/packages/patches/mtools-mformat-uninitialized.patch
parent2ca3fdc2db1aef96fbf702a2f26f5e18ce832038 (diff)
parent14da3daafc8dd92fdabd3367694c930440fd72cb (diff)
downloadguix-patches-3b458d5462e6bbd852c2dc5c6670d5655abf53f5.tar
guix-patches-3b458d5462e6bbd852c2dc5c6670d5655abf53f5.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/patches/mtools-mformat-uninitialized.patch')
-rw-r--r--gnu/packages/patches/mtools-mformat-uninitialized.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/gnu/packages/patches/mtools-mformat-uninitialized.patch b/gnu/packages/patches/mtools-mformat-uninitialized.patch
new file mode 100644
index 0000000000..ae69d45c99
--- /dev/null
+++ b/gnu/packages/patches/mtools-mformat-uninitialized.patch
@@ -0,0 +1,20 @@
+Fix a bug whereby 'mformat' could end up passing uninitialized bytes
+to write(2). This could be reproduced with:
+
+ mformat -C -f 1440 -L 16 -N 77777777 -i /tmp/x ::
+
+where the output of /tmp/x would be non-deterministic.
+
+Patch by Ludovic Courtès <ludo@gnu.org>.
+
+--- mtools-4.0.23/mformat.c 2019-04-21 00:12:01.496116195 +0200
++++ mtools-4.0.23/mformat.c 2019-04-21 00:12:36.675967157 +0200
+@@ -927,6 +927,7 @@ void mformat(int argc, char **argv, int
+
+ char *endptr;
+
++ memset(&boot.bytes, '\0', sizeof boot);
+ hs = hs_set = 0;
+ argtracks = 0;
+ argheads = 0;
+