mirror of https://gerrit.osmocom.org/libosmocore
gsup: Fail decoding if len of PDP Type IE is less than 2 bytes
As documented in gsup.adoc, this field is expected to be 2 bytes. This is only a intermediate step to showcase the related test scenarios submitting IE with len > 2. The logic will be changed in a follow-up patch when changing the IE to also encode/decode the missing Address part. Change-Id: I0d024a9a4fb10beeff39ac33a9d2ed02f88f4580
This commit is contained in:
parent
f196b889dc
commit
f2be74b67b
|
@ -150,6 +150,8 @@ static int decode_pdp_info(uint8_t *data, size_t data_len,
|
|||
break;
|
||||
|
||||
case OSMO_GSUP_PDP_TYPE_IE:
|
||||
if (value_len < 2)
|
||||
return -GMM_CAUSE_PROTO_ERR_UNSPEC;
|
||||
pdp_info->pdp_type =
|
||||
osmo_decode_big_endian(value, value_len) & 0x0fff;
|
||||
break;
|
||||
|
|
|
@ -164,7 +164,7 @@ DLGSUP Stopping DLGSUP logging
|
|||
message 2: tested 21248 modifications, 2577 parse failures
|
||||
message 3: tested 2816 modifications, 510 parse failures
|
||||
message 4: tested 3584 modifications, 770 parse failures
|
||||
message 5: tested 20736 modifications, 4025 parse failures
|
||||
message 5: tested 20736 modifications, 4028 parse failures
|
||||
message 6: tested 3584 modifications, 771 parse failures
|
||||
message 7: tested 3584 modifications, 770 parse failures
|
||||
message 8: tested 2816 modifications, 510 parse failures
|
||||
|
|
Loading…
Reference in New Issue