rsl_rx_resource_indication(): check result of rsl_tlv_parse()
Change-Id: I3b4758f80f2cd87e22bd3617e189f12403461ea3 Related: SYS#5313
This commit is contained in:
parent
74c15a8c8a
commit
0fc23b9d2f
|
@ -1514,9 +1514,7 @@ static int rsl_rx_resource_indication(struct msgb *msg)
|
|||
struct gsm_bts_trx *trx = sign_link->trx;
|
||||
struct gsm_lchan *lchan;
|
||||
int ts_nr;
|
||||
int i;
|
||||
|
||||
rsl_tlv_parse(&tp, rslh->data, msgb_l2len(msg) - sizeof(*rslh));
|
||||
int rc, i;
|
||||
|
||||
LOGP(DRSL, LOGL_DEBUG, "%s Rx Resource Indication\n", gsm_trx_name(trx));
|
||||
|
||||
|
@ -1530,6 +1528,12 @@ static int rsl_rx_resource_indication(struct msgb *msg)
|
|||
}
|
||||
}
|
||||
|
||||
rc = rsl_tlv_parse(&tp, rslh->data, msgb_l2len(msg) - sizeof(*rslh));
|
||||
if (rc < 0) {
|
||||
LOGP(DRSL, LOGL_ERROR, "Rx Resource Indication: failed to parse the message\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
res_info_ie = TLVP_GET(&tp, RSL_IE_RESOURCE_INFO);
|
||||
if (!res_info_ie) {
|
||||
LOGP(DRSL, LOGL_ERROR, "Rx Resource Indication: missing Resource Info IE\n");
|
||||
|
|
Loading…
Reference in New Issue