From 78c564d20cdd9d224214b0f85a2c188b10eaa97192bb15ea0d443518c5c5ba56 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 21 Nov 2020 00:32:13 +0000 Subject: [PATCH] Accepting request 849718 from home:adamm:branches:utilities - fix_junk_in_partition.patch: Initialize memory that created the partition table instead of writing random bytes to it (bsc#1178692) OBS-URL: https://build.opensuse.org/request/show/849718 OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=121 --- fix_junk_in_partition.patch | 19 +++++++++++++++++++ schily.changes | 6 ++++++ schily.spec | 1 + 3 files changed, 26 insertions(+) create mode 100644 fix_junk_in_partition.patch diff --git a/fix_junk_in_partition.patch b/fix_junk_in_partition.patch new file mode 100644 index 0000000..06b6ed9 --- /dev/null +++ b/fix_junk_in_partition.patch @@ -0,0 +1,19 @@ +For testing, you can reproduce partition with, + +# valgrind --malloc-fill=0xba --track-origins=yes /usr/bin/mkisofs -o test.iso -chrp-boot -part +# fdisk -l test + + +Index: cdrtools-3.02/libhfs_iso/internal.h +=================================================================== +--- cdrtools-3.02.orig/libhfs_iso/internal.h ++++ cdrtools-3.02/libhfs_iso/internal.h +@@ -26,7 +26,7 @@ + # define ERROR(code, str) (hfs_error = (str), errno = (code)) + + # define SIZE(type, n) ((size_t) (sizeof(type) * (n))) +-# define ALLOC(type, n) ((type *) malloc(SIZE(type, n))) ++# define ALLOC(type, n) ((type *) calloc(sizeof(type), n)) + # define ALLOCX(type, n) ((n) ? ALLOC(type, n) : (type *) 0) + # define FREE(ptr) {if (ptr) free((void *) ptr) ;} + diff --git a/schily.changes b/schily.changes index 9393f04..f68dd0f 100644 --- a/schily.changes +++ b/schily.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Nov 20 16:38:12 UTC 2020 - Adam Majer + +- fix_junk_in_partition.patch: Initialize memory that created the + partition table instead of writing random bytes to it (bsc#1178692) + ------------------------------------------------------------------- Sat Nov 7 10:50:14 UTC 2020 - Jan Engelhardt diff --git a/schily.spec b/schily.spec index 38f861d..e0def01 100644 --- a/schily.spec +++ b/schily.spec @@ -41,6 +41,7 @@ Source1: README-FIRST # and submit patches upstream FIRST (cc to the bspkg maintainer perhaps). Patch1: iconv-name.diff Patch2: schily-2018-05-25_star_configuration.patch +Patch3: fix_junk_in_partition.patch BuildRequires: autoconf BuildRequires: fdupes BuildRequires: gcc-c++