aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-10-21 12:18:14 +0200
committerHarald Welte <laforge@gnumonks.org>2018-10-21 12:20:02 +0000
commitb0177b2dfc9d5825c624c79b26bced46cdbb9a0e (patch)
treed9b87ebf509cd209e294d1b510ef461e991f49e4 /src
parent7f2e8512ccf272708eb7cb8f69466011a084490f (diff)
ipaccess-proxy: Add error handling to IAP CCM ID RESP parsing
Change-Id: I56ec149979572486b904fc1409cf3cd096b6eb34 Fixes: Coverity CID#188867
Diffstat (limited to 'src')
-rw-r--r--src/ipaccess/ipaccess-proxy.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ipaccess/ipaccess-proxy.c b/src/ipaccess/ipaccess-proxy.c
index a2ce63327..26c5bcd92 100644
--- a/src/ipaccess/ipaccess-proxy.c
+++ b/src/ipaccess/ipaccess-proxy.c
@@ -458,7 +458,11 @@ static int ipaccess_rcvmsg(struct ipa_proxy_conn *ipc, struct msgb *msg,
case IPAC_MSGT_ID_RESP:
DEBUGP(DLMI, "ID_RESP ");
/* parse tags, search for Unit ID */
- ipa_ccm_id_resp_parse(&tlvp, (uint8_t *)msg->l2h+1, msgb_l2len(msg)-1);
+ ret = ipa_ccm_id_resp_parse(&tlvp, (uint8_t *)msg->l2h+1, msgb_l2len(msg)-1);
+ if (ret < 0) {
+ LOGP(DLINP, LOGL_ERROR, "Error parsing CCM ID RESP !?!\n");
+ return -EIO;
+ }
DEBUGP(DLMI, "\n");
if (!TLVP_PRESENT(&tlvp, IPAC_IDTAG_UNIT)) {