Change in libosmocore[master]: gprs_bssgp_rim: fix bug in dub_tlvp_header()

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/.

dexter gerrit-no-reply at lists.osmocom.org
Wed Jan 20 15:00:01 UTC 2021


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/22339 )


Change subject: gprs_bssgp_rim: fix bug in dub_tlvp_header()
......................................................................

gprs_bssgp_rim: fix bug in dub_tlvp_header()

When the length field is written the function writes the lower and the
higher half of the length at the same position, so the higher half is
overwritten with the lower half, this is wrong.

Change-Id: I3cce0b2796793554a421fd3ce8e749c52d22eaea
Related: CID#216670
Related: SYS#5103
---
M src/gb/gprs_bssgp_rim.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/39/22339/1

diff --git a/src/gb/gprs_bssgp_rim.c b/src/gb/gprs_bssgp_rim.c
index 2096977..23fb3a0 100644
--- a/src/gb/gprs_bssgp_rim.c
+++ b/src/gb/gprs_bssgp_rim.c
@@ -438,7 +438,7 @@
 	} else {
 		memmove(buf_ptr + 1, buf_ptr, len);
 		buf_ptr[1] = len >> 8;
-		buf_ptr[1] = len & 0xff;
+		buf_ptr[2] = len & 0xff;
 		buf_ptr += TVLV_HDR_MAXLEN;
 	}
 	buf_ptr += len;

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I3cce0b2796793554a421fd3ce8e749c52d22eaea
Gerrit-Change-Number: 22339
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210120/3d294ee4/attachment.htm>


More information about the gerrit-log mailing list