[S] Change in libosmocore[master]: Fix 'Fix parsing of TLV_TYPE_SINGLE_TV'
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/32549 ) Change subject: Fix 'Fix parsing of TLV_TYPE_SINGLE_TV' ...................................................................... Fix 'Fix parsing of TLV_TYPE_SINGLE_TV' A commit was merged recently attempting to fix decoding of TLV_TYPE_SINGLE_TV. It did mostly a good job, but missed updating the o_tag pointer used to fill in the structures. This commit fixes that specific part missing. Fixes: 559a6ee68359dab691a483573982e6f8c6439ae2 Change-Id: Id619459c17976b77cd2c7e4179123bb06807285c --- M src/gsm/tlv_parser.c 1 file changed, 21 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/49/32549/1 diff --git a/src/gsm/tlv_parser.c b/src/gsm/tlv_parser.c index e47b94f..f42c483 100644 --- a/src/gsm/tlv_parser.c +++ b/src/gsm/tlv_parser.c @@ -241,9 +241,13 @@ *o_tag = tag; /* single octet TV IE */ - if (def->def[tag >> 4].type == TLV_TYPE_SINGLE_TV + if (def->def[tag >> 4].type == TLV_TYPE_SINGLE_TV) { + *o_tag = tag >> 4; + *o_val = buf; + *o_len = 1; + return 1; + } else if ((tag > 0x0f) && (def->def[tag & 0xf0].type == TLV_TYPE_SINGLE_TV)) { /* backward compat for old IEs with half-octet tag defined as 0xN0: */ - || ((tag > 0x0f) && (def->def[tag & 0xf0].type == TLV_TYPE_SINGLE_TV))) { *o_tag = tag & 0xf0; *o_val = buf; *o_len = 1; -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32549 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Id619459c17976b77cd2c7e4179123bb06807285c Gerrit-Change-Number: 32549 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-MessageType: newchange
participants (1)
-
pespin