Change in osmo-sgsn[master]: fix bogus assertion in encode_comp_field()

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

Stefan Sperling gerrit-no-reply at lists.osmocom.org
Mon Nov 12 11:54:09 UTC 2018


Stefan Sperling has uploaded this change for review. ( https://gerrit.osmocom.org/11729


Change subject: fix bogus assertion in encode_comp_field()
......................................................................

fix bogus assertion in encode_comp_field()

Fix an obvious logic bug in an assertion in encode_comp_field().

Found by: Neels

Change-Id: If6f3598cd6da4643ff2214e21c0d21f6eff0eb67
---
M src/gprs/gprs_sndcp_xid.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/29/11729/1

diff --git a/src/gprs/gprs_sndcp_xid.c b/src/gprs/gprs_sndcp_xid.c
index 8f844b5..09e21f5 100644
--- a/src/gprs/gprs_sndcp_xid.c
+++ b/src/gprs/gprs_sndcp_xid.c
@@ -443,7 +443,7 @@
 	OSMO_ASSERT(comp_field->entity <= 0x1f);
 
 	/* Check if the algorithm number is within bounds */
-	OSMO_ASSERT(comp_field->algo >= 0 || comp_field->algo <= 0x1f);
+	OSMO_ASSERT(comp_field->algo >= 0 && comp_field->algo <= 0x1f);
 
 	/* Zero out buffer */
 	memset(dst, 0, dst_maxlen);

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If6f3598cd6da4643ff2214e21c0d21f6eff0eb67
Gerrit-Change-Number: 11729
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling <ssperling at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181112/e4e4216a/attachment.htm>


More information about the gerrit-log mailing list