Harald Welte has submitted this change and it was merged. (
https://gerrit.osmocom.org/10216 )
Change subject: ipa_ccm_idtag_parse*: Fix reported length value
......................................................................
ipa_ccm_idtag_parse*: Fix reported length value
IPA CCM is using a somewhat weird TLV encoding scheme:
* 16bit length (of tag and value)
* 8bit tag
* value
Our existing code mapping the CCM to 'struct tlv_parse' used the plain
length value without accounting for the one-byte tag.
This patch ensures we only report the length of the "value" part,
excluding the tag.
Change-Id: I435aaa33605bd48635715a2c81aa2d231c1abf51
---
M src/gsm/ipa.c
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Neels Hofmeyr: Looks good to me, but someone else must approve
Max: Looks good to me, but someone else must approve
osmith: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/gsm/ipa.c b/src/gsm/ipa.c
index d423c26..b6fdc98 100644
--- a/src/gsm/ipa.c
+++ b/src/gsm/ipa.c
@@ -128,7 +128,7 @@
DEBUGPC(DLMI, "%s='%s' ", ipa_ccm_idtag_name(t_tag), cur);
- dec->lv[t_tag].len = t_len - len_offset;
+ dec->lv[t_tag].len = t_len - 1 - len_offset;
dec->lv[t_tag].val = cur;
cur += t_len - len_offset;
--
To view, visit https://gerrit.osmocom.org/10216
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I435aaa33605bd48635715a2c81aa2d231c1abf51
Gerrit-Change-Number: 10216
Gerrit-PatchSet: 4
Gerrit-Owner: Harald Welte <[email protected]>
Gerrit-Assignee: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Holger Freyther <[email protected]>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <[email protected]>
Gerrit-Reviewer: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>