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.orgdexter has submitted this change and it was merged.
Change subject: mgcp_test: fix wrong strcmp() parameters
......................................................................
mgcp_test: fix wrong strcmp() parameters
The CRCX string parameter lacks the quotes and the result of
the function call is not checked against zero. Also the
return code of get_conn_id_from_response() is not asserted.
Fixes: Coverity CID#180534
Change-Id: If4f3ed2c3572da196160569a9705b7a302b700a9
---
M tests/mgcp/mgcp_test.c
1 file changed, 6 insertions(+), 3 deletions(-)
Approvals:
Neels Hofmeyr: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/tests/mgcp/mgcp_test.c b/tests/mgcp/mgcp_test.c
index fb99911..86edf00 100644
--- a/tests/mgcp/mgcp_test.c
+++ b/tests/mgcp/mgcp_test.c
@@ -765,6 +765,7 @@
struct mgcp_config *cfg;
int i;
char last_conn_id[256];
+ int rc;
cfg = mgcp_config_alloc();
@@ -792,9 +793,11 @@
OSMO_ASSERT(false);
}
- if (msg && strcmp(t->name, CRCX))
- get_conn_id_from_response(msg->data, last_conn_id,
- sizeof(last_conn_id));
+ if (msg && strcmp(t->name, "CRCX") == 0) {
+ rc = get_conn_id_from_response(msg->data, last_conn_id,
+ sizeof(last_conn_id));
+ OSMO_ASSERT(rc == 0);
+ }
msgb_free(msg);
--
To view, visit https://gerrit.osmocom.org/5172
To unsubscribe, visit https://gerrit.osmocom.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If4f3ed2c3572da196160569a9705b7a302b700a9
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>