[MERGED] openbsc[master]: OM2000: Fixup based on Coverity Scan suggestion

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
Wed Nov 16 16:35:47 UTC 2016


Harald Welte has submitted this change and it was merged.

Change subject: OM2000: Fixup based on Coverity Scan suggestion
......................................................................


OM2000: Fixup based on Coverity Scan suggestion

This commit fixes Coverity Scan defect:

CID 151901:  Insecure data handling  (TAINTED_SCALAR)
Passing tainted variable "tag_len" to a tainted sink.

Change-Id: Ic71ed6a3bbb228bc03e95bfc4a6f5fe09cf5a021
---
M openbsc/src/libbsc/abis_om2000.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/openbsc/src/libbsc/abis_om2000.c b/openbsc/src/libbsc/abis_om2000.c
index 2733a90..ae23e50 100644
--- a/openbsc/src/libbsc/abis_om2000.c
+++ b/openbsc/src/libbsc/abis_om2000.c
@@ -2438,10 +2438,10 @@
 }
 
 /* Display fault report bits (helper function of display_fault_maps()) */
-static bool display_fault_bits(const uint8_t *vect, unsigned int len,
+static bool display_fault_bits(const uint8_t *vect, uint16_t len,
 			       uint8_t dei, const struct abis_om2k_mo *mo)
 {
-	int i;
+	uint16_t i;
 	int k;
 	bool faults_present = false;
 	int first = 1;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic71ed6a3bbb228bc03e95bfc4a6f5fe09cf5a021
Gerrit-PatchSet: 3
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list