summaryrefslogtreecommitdiffstats
path: root/main/multipath-tools/multipath-tools-0.4.9-buffer-overflows.patch
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@gmail.com>2011-01-05 09:53:21 +0000
committerLeonardo Arena <rnalrd@gmail.com>2011-01-05 09:54:17 +0000
commit410b40e43d25b7bbf3cb33dce47d19ccba134e96 (patch)
treea6be1f0a1ec9e74031e1ccd9b4b3540e35bee156 /main/multipath-tools/multipath-tools-0.4.9-buffer-overflows.patch
parenta1271088c076595998e1da740ec9047ca2b85e21 (diff)
downloadaports-410b40e43d25b7bbf3cb33dce47d19ccba134e96.tar.bz2
aports-410b40e43d25b7bbf3cb33dce47d19ccba134e96.tar.xz
main/multipath-tools: fix buffer overflow
Diffstat (limited to 'main/multipath-tools/multipath-tools-0.4.9-buffer-overflows.patch')
-rw-r--r--main/multipath-tools/multipath-tools-0.4.9-buffer-overflows.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/main/multipath-tools/multipath-tools-0.4.9-buffer-overflows.patch b/main/multipath-tools/multipath-tools-0.4.9-buffer-overflows.patch
new file mode 100644
index 000000000..38719aceb
--- /dev/null
+++ b/main/multipath-tools/multipath-tools-0.4.9-buffer-overflows.patch
@@ -0,0 +1,22 @@
+--- multipath-tools-0.4.9.orig/libmultipath/prioritizers/datacore.c 2010-05-22 05:01:58.000000000 -0700
++++ multipath-tools-0.4.9/libmultipath/prioritizers/datacore.c 2010-11-28 12:22:12.037228583 -0800
+@@ -94,7 +94,7 @@
+ if ((io_hdr.info & SG_INFO_OK_MASK) != SG_INFO_OK)
+ return 0;
+
+- snprintf(vendor, 9, "%.8s\n", inqBuffp + 8);
++ snprintf(vendor, 8, "%.8s\n", inqBuffp + 8);
+ snprintf(product, 17, "%.16s", inqBuffp + 16);
+ snprintf(luname, 21, "%.19s", inqBuffp + 36);
+ snprintf(wwpn, 17, "%.16s", inqBuffp + 96);
+--- multipath-tools-0.4.9.orig/libmultipath/prioritizers/hds.c 2010-05-22 05:01:58.000000000 -0700
++++ multipath-tools-0.4.9/libmultipath/prioritizers/hds.c 2010-11-28 12:22:44.199483997 -0800
+@@ -123,7 +123,7 @@
+ return -1;
+ }
+
+- snprintf (vendor, 9, "%.8s", inqBuffp + 8);
++ snprintf (vendor, 8, "%.8s", inqBuffp + 8);
+ snprintf (product, 17, "%.16s", inqBuffp + 16);
+ snprintf (serial, 5, "%.4s", inqBuffp + 40);
+ snprintf (ldev, 5, "%.4s", inqBuffp + 44);