From 096a55b7b7ea9330fb143e7e3dbb348f8f20e1a6 Mon Sep 17 00:00:00 2001 From: Dan Rosenberg Date: Fri, 1 Oct 2010 11:51:47 +0000 Subject: [PATCH] --- yaml --- r: 211406 b: refs/heads/master c: 51e97a12bef19b7e43199fc153cf9bd5f2140362 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/sctp/auth.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index dd6d8dcea3a4..26e72b3b085f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d7e0d19aa0fdd22819d35db551bd54c1bcf9c2aa +refs/heads/master: 51e97a12bef19b7e43199fc153cf9bd5f2140362 diff --git a/trunk/net/sctp/auth.c b/trunk/net/sctp/auth.c index 86366390038a..ddbbf7c81fa1 100644 --- a/trunk/net/sctp/auth.c +++ b/trunk/net/sctp/auth.c @@ -543,16 +543,20 @@ struct sctp_hmac *sctp_auth_asoc_get_hmac(const struct sctp_association *asoc) id = ntohs(hmacs->hmac_ids[i]); /* Check the id is in the supported range */ - if (id > SCTP_AUTH_HMAC_ID_MAX) + if (id > SCTP_AUTH_HMAC_ID_MAX) { + id = 0; continue; + } /* See is we support the id. Supported IDs have name and * length fields set, so that we can allocated and use * them. We can safely just check for name, for without the * name, we can't allocate the TFM. */ - if (!sctp_hmac_list[id].hmac_name) + if (!sctp_hmac_list[id].hmac_name) { + id = 0; continue; + } break; }