[PATCH] osmo-pcu[master]: TBF flow: Coverity fix

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

arvind.sirsikar gerrit-no-reply at lists.osmocom.org
Fri Aug 26 12:46:07 UTC 2016


Review at  https://gerrit.osmocom.org/769

TBF flow: Coverity fix

Related: CID#1361925, CID:#1361924

Change-Id: Ib1f71a8940eed7ad74211092275dfa29aa353fc7
---
M src/tbf_dl.cpp
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/69/769/1

diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index a24cc21..4c67a12 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -691,6 +691,9 @@
 
 	msg_data = msgb_put(dl_msg, msg_len);
 
+	OSMO_ASSERT(rlc.num_data_blocks <= ARRAY_SIZE(rlc.block_info));
+	OSMO_ASSERT(rlc.num_data_blocks > 0);
+
 	/* Copy block(s) to RLC message */
 	for (data_block_idx = 0; data_block_idx < rlc.num_data_blocks;
 		data_block_idx++)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib1f71a8940eed7ad74211092275dfa29aa353fc7
Gerrit-PatchSet: 1
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: arvind.sirsikar <arvind.sirsikar at radisys.com>



More information about the gerrit-log mailing list