Change in osmo-bsc[master]: ipaccess-proxy: Add error handling to IAP CCM ID RESP parsing

2018-10-21 Thread Harald Welte
Harald Welte has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/11407 )

Change subject: ipaccess-proxy: Add error handling to IAP CCM ID RESP parsing
..

ipaccess-proxy: Add error handling to IAP CCM ID RESP parsing

Change-Id: I56ec149979572486b904fc1409cf3cd096b6eb34
Fixes: Coverity CID#188867
---
M src/ipaccess/ipaccess-proxy.c
1 file changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/ipaccess/ipaccess-proxy.c b/src/ipaccess/ipaccess-proxy.c
index a2ce633..26c5bcd 100644
--- a/src/ipaccess/ipaccess-proxy.c
+++ b/src/ipaccess/ipaccess-proxy.c
@@ -458,7 +458,11 @@
case IPAC_MSGT_ID_RESP:
DEBUGP(DLMI, "ID_RESP ");
/* parse tags, search for Unit ID */
-   ipa_ccm_id_resp_parse(, (uint8_t *)msg->l2h+1, 
msgb_l2len(msg)-1);
+   ret = ipa_ccm_id_resp_parse(, (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(, IPAC_IDTAG_UNIT)) {

-- 
To view, visit https://gerrit.osmocom.org/11407
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I56ec149979572486b904fc1409cf3cd096b6eb34
Gerrit-Change-Number: 11407
Gerrit-PatchSet: 3
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)


Change in osmo-bsc[master]: ipaccess-proxy: Add error handling to IAP CCM ID RESP parsing

2018-10-21 Thread Harald Welte
Harald Welte has posted comments on this change. ( 
https://gerrit.osmocom.org/11407 )

Change subject: ipaccess-proxy: Add error handling to IAP CCM ID RESP parsing
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/11407
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I56ec149979572486b904fc1409cf3cd096b6eb34
Gerrit-Change-Number: 11407
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder (102)
Gerrit-Comment-Date: Sun, 21 Oct 2018 11:42:56 +
Gerrit-HasComments: No
Gerrit-HasLabels: Yes


Change in osmo-bsc[master]: ipaccess-proxy: Add error handling to IAP CCM ID RESP parsing

2018-10-21 Thread Harald Welte
Harald Welte has uploaded this change for review. ( 
https://gerrit.osmocom.org/11407


Change subject: ipaccess-proxy: Add error handling to IAP CCM ID RESP parsing
..

ipaccess-proxy: Add error handling to IAP CCM ID RESP parsing

Change-Id: I56ec149979572486b904fc1409cf3cd096b6eb34
Fixes: Coverity CID#188867
---
M src/ipaccess/ipaccess-proxy.c
1 file changed, 5 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/07/11407/1

diff --git a/src/ipaccess/ipaccess-proxy.c b/src/ipaccess/ipaccess-proxy.c
index a2ce633..26c5bcd 100644
--- a/src/ipaccess/ipaccess-proxy.c
+++ b/src/ipaccess/ipaccess-proxy.c
@@ -458,7 +458,11 @@
case IPAC_MSGT_ID_RESP:
DEBUGP(DLMI, "ID_RESP ");
/* parse tags, search for Unit ID */
-   ipa_ccm_id_resp_parse(, (uint8_t *)msg->l2h+1, 
msgb_l2len(msg)-1);
+   ret = ipa_ccm_id_resp_parse(, (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(, IPAC_IDTAG_UNIT)) {

--
To view, visit https://gerrit.osmocom.org/11407
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I56ec149979572486b904fc1409cf3cd096b6eb34
Gerrit-Change-Number: 11407
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte