summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-01-20 11:29:43 -0500
committerDavid S. Miller <davem@davemloft.net>2017-01-20 11:29:43 -0500
commit91e744653cb80554f3fdfd1d31c5ddf7b6169f37 (patch)
tree28e02e536cd1fe1982cae0dfd25c9b6604713c0c
parent0e73fc9a56f22f2eec4d2b2910c649f7af67b74d (diff)
Revert "net: sctp: fix array overrun read on sctp_timer_tbl"
This reverts commit 0e73fc9a56f22f2eec4d2b2910c649f7af67b74d. This fix wasn't correct, a better one is coming right up. Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/sctp/debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/debug.c b/net/sctp/debug.c
index e371a0d90068..95d7b15dad21 100644
--- a/net/sctp/debug.c
+++ b/net/sctp/debug.c
@@ -166,7 +166,7 @@ static const char *const sctp_timer_tbl[] = {
/* Lookup timer debug name. */
const char *sctp_tname(const sctp_subtype_t id)
{
- if (id.timeout < ARRAY_SIZE(sctp_timer_tbl))
+ if (id.timeout <= SCTP_EVENT_TIMEOUT_MAX)
return sctp_timer_tbl[id.timeout];
return "unknown_timer";
}