summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-12-17 18:55:29 -0500
committerMike Frysinger <vapier@gentoo.org>2015-12-17 19:00:05 -0500
commit5eafff1506f58a1e7844b806f93dd9e93f9e271e (patch)
treea875db19e7503eee8aada5f819259a0846226446 /sys-block/open-iscsi/files
parentsys-block/open-iscsi: fix mishandling of MY_PV (diff)
downloadgentoo-5eafff1506f58a1e7844b806f93dd9e93f9e271e.tar.gz
gentoo-5eafff1506f58a1e7844b806f93dd9e93f9e271e.tar.bz2
gentoo-5eafff1506f58a1e7844b806f93dd9e93f9e271e.zip
sys-block/open-iscsi: fix incorrect memset call
Diffstat (limited to 'sys-block/open-iscsi/files')
-rw-r--r--sys-block/open-iscsi/files/open-iscsi-2.0.873-memset.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/sys-block/open-iscsi/files/open-iscsi-2.0.873-memset.patch b/sys-block/open-iscsi/files/open-iscsi-2.0.873-memset.patch
new file mode 100644
index 000000000000..c56669192f09
--- /dev/null
+++ b/sys-block/open-iscsi/files/open-iscsi-2.0.873-memset.patch
@@ -0,0 +1,24 @@
+clear the size of the storage, not the size of the pointer
+
+--- a/usr/md5.c
++++ b/usr/md5.c
+@@ -127,7 +127,7 @@ MD5Final(md5byte digest[16], struct MD5Context *ctx)
+
+ byteSwap(ctx->buf, 4);
+ memcpy(digest, ctx->buf, 16);
+- memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
++ memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */
+ }
+
+ #ifndef ASM_MD5
+--- a/utils/md5.c
++++ b/utils/md5.c
+@@ -133,7 +133,7 @@ MD5Final(md5byte digest[16], struct MD5Context *ctx)
+
+ byteSwap(ctx->buf, 4);
+ memcpy(digest, ctx->buf, 16);
+- memset(ctx, 0, sizeof (ctx)); /* In case it's sensitive */
++ memset(ctx, 0, sizeof (*ctx)); /* In case it's sensitive */
+ }
+
+ #ifndef ASM_MD5