summaryrefslogtreecommitdiff
path: root/app-crypt/sbsigntools/files/0002-image.c-clear-image-variable.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-crypt/sbsigntools/files/0002-image.c-clear-image-variable.patch
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-crypt/sbsigntools/files/0002-image.c-clear-image-variable.patch')
-rw-r--r--app-crypt/sbsigntools/files/0002-image.c-clear-image-variable.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/app-crypt/sbsigntools/files/0002-image.c-clear-image-variable.patch b/app-crypt/sbsigntools/files/0002-image.c-clear-image-variable.patch
new file mode 100644
index 000000000000..dfe183e66cd2
--- /dev/null
+++ b/app-crypt/sbsigntools/files/0002-image.c-clear-image-variable.patch
@@ -0,0 +1,29 @@
+From 21e984fa9d93a760cc03f5d9d13d023809227df2 Mon Sep 17 00:00:00 2001
+From: James Bottomley <JBottomley@Parallels.com>
+Date: Thu, 11 Apr 2013 21:12:17 -0700
+Subject: image.c: clear image variable
+
+Not zeroing the image after talloc occasionally leads to a segfault because
+the programme thinks it has a signature when in reality it just has a junk
+pointer and segfaults.
+
+Signed-off-by: James Bottomley <JBottomley@Parallels.com>
+---
+ src/image.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/image.c b/src/image.c
+index cc55791..10eba0e 100644
+--- a/src/image.c
++++ b/src/image.c
+@@ -401,6 +401,7 @@ struct image *image_load(const char *filename)
+ return NULL;
+ }
+
++ memset(image, 0, sizeof(*image));
+ rc = fileio_read_file(image, filename, &image->buf, &image->size);
+ if (rc)
+ goto err;
+--
+1.8.2.1
+