From 22cd9f1d484d8609f616b6500c0c658a9b07d5eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Fri, 6 Nov 2015 03:11:45 +0100 Subject: Refresh and rename patches --- debian/patches/0100-out-of-bounds.patch | 61 +++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 debian/patches/0100-out-of-bounds.patch (limited to 'debian/patches/0100-out-of-bounds.patch') diff --git a/debian/patches/0100-out-of-bounds.patch b/debian/patches/0100-out-of-bounds.patch new file mode 100644 index 0000000..19ba67b --- /dev/null +++ b/debian/patches/0100-out-of-bounds.patch @@ -0,0 +1,61 @@ +Description: prevent out-of-bounds +Author: Jörg Frings-Fürst +Forwarded: https://sourceforge.net/p/ipmiutil/mailman/ipmiutil-developers/?viewmonth=201410 +Last-Update: 2014-10-29 +--- +Index: trunk/util/ievents.c +=================================================================== +--- trunk.orig/util/ievents.c ++++ trunk/util/ievents.c +@@ -193,10 +193,10 @@ static const char *sensor_types[NSTYPES] + /* 2Eh */ "ME" /* 0xDC == ME Node Manager */ + }; + +-#define NFWERRS 15 ++#define NFWERRS 14 + static struct { /* See Table 36-3, type 0Fh, offset 00h */ + int code; char *msg; +- } fwerrs[NFWERRS] = { ++ } fwerrs[NFWERRS + 1] = { + { 0x00, "Unspecified"}, + { 0x01, "No system memory"}, + { 0x02, "No usable memory"}, +@@ -214,10 +214,10 @@ static struct { /* See Table 36-3, ty + { 0x0E, "Reserved" } + }; + +-#define NFWSTAT 27 ++#define NFWSTAT 26 + static struct { /* See Table 36-3, type 0Fh, offset 01h & 02h */ + int code; char *msg; +- } fwstat[NFWSTAT] = { ++ } fwstat[NFWSTAT + 1] = { + { 0x00, "Unspecified"}, + { 0x01, "Memory init"}, + { 0x02, "Hard disk init"}, +Index: trunk/util/ifirewall.h +=================================================================== +--- trunk.orig/util/ifirewall.h ++++ trunk/util/ifirewall.h +@@ -82,7 +82,7 @@ struct lun_netfn_support { + }; + struct lun_support { + unsigned char support; +- struct lun_netfn_support netfn[MAX_NETFN_PAIR]; ++ struct lun_netfn_support netfn[MAX_NETFN]; + }; + struct bmc_fn_support { + struct lun_support lun[MAX_LUN]; +Index: trunk/util/iconfig.c +=================================================================== +--- trunk.orig/util/iconfig.c ++++ trunk/util/iconfig.c +@@ -1765,7 +1765,7 @@ int SerialIsOptional(int bparam) + int optvals[9] = { 5, 9, 10, 11, 12, 13, 14, 20, 21 }; + int rv = 0; + int i; +- for (i = 0; i < sizeof(optvals); i++) { ++ for (i = 0; i < (sizeof(optvals) / sizeof(int)); i++) { + if (optvals[i] == bparam) { rv = 1; break; } + } + return(rv); -- cgit v1.2.3