[MERGED] osmo-bts[master]: vty: Ensure to not use negative (error) sapi value

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

Harald Welte gerrit-no-reply at lists.osmocom.org
Sat Nov 26 13:03:39 UTC 2016


Harald Welte has submitted this change and it was merged.

Change subject: vty: Ensure to not use negative (error) sapi value
......................................................................


vty: Ensure to not use negative (error) sapi value

Change-Id: I282311de8514c1cc0a1b716e97e90ddf48863bb4
Fixes: Coverity CID 57617
Fixes: Coverity CID 57618
---
M src/common/vty.c
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/vty.c b/src/common/vty.c
index 85c67a2..607b231 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -869,6 +869,7 @@
 	int sapi;
 
 	sapi = get_string_value(gsmtap_sapi_names, argv[0]);
+	OSMO_ASSERT(sapi >= 0);
 
 	if (sapi == GSMTAP_CHANNEL_ACCH)
 		gsmtap_sapi_acch = 1;
@@ -884,6 +885,7 @@
 	int sapi;
 
 	sapi = get_string_value(gsmtap_sapi_names, argv[0]);
+	OSMO_ASSERT(sapi >= 0);
 
 	if (sapi == GSMTAP_CHANNEL_ACCH)
 		gsmtap_sapi_acch = 0;

-- 
To view, visit https://gerrit.osmocom.org/1280
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I282311de8514c1cc0a1b716e97e90ddf48863bb4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list