Change in libosmocore[master]: gprs_ns2: Fix parsing of SNS-{ADD, DEL, CHANGE_WEIGHT}

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Fri Oct 9 15:22:34 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/20509 )

Change subject: gprs_ns2: Fix parsing of SNS-{ADD,DEL,CHANGE_WEIGHT}
......................................................................

gprs_ns2: Fix parsing of SNS-{ADD,DEL,CHANGE_WEIGHT}

Change-Id: I94c12986f8255e4373b13b1a8fae3df08004ad96
Related: OS#4791
---
M src/gb/gprs_ns2.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c
index aca8994..b82fd0d 100644
--- a/src/gb/gprs_ns2.c
+++ b/src/gb/gprs_ns2.c
@@ -875,8 +875,8 @@
 	case SNS_PDUT_CHANGE_WEIGHT:
 	case SNS_PDUT_DELETE:
 		/* weird layout: NSEI TLV, then value-only transaction IE, then TLV again */
-		rc = ns2_tlv_parse(&tp, nsh->data+1,
-				   msgb_l2len(msg) - sizeof(*nsh)-1, 0, 0);
+		rc = ns2_tlv_parse(&tp, nsh->data+5,
+				   msgb_l2len(msg) - sizeof(*nsh)-5, 0, 0);
 		if (rc < 0) {
 			LOGPC(DLNS, LOGL_NOTICE, "Error during TLV Parse in %s\n", msgb_hexdump(msg));
 			return rc;

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I94c12986f8255e4373b13b1a8fae3df08004ad96
Gerrit-Change-Number: 20509
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-CC: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201009/9ff0a3c6/attachment.htm>


More information about the gerrit-log mailing list