Change in osmo-remsim[master]: Fix various 'uninitialized variable' bugs reported by coverity
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/31178 ) Change subject: Fix various 'uninitialized variable' bugs reported by coverity ...................................................................... Fix various 'uninitialized variable' bugs reported by coverity The asn1c-generated struct definitions have an automatic _asn_ctx member, and we never initialize that so far. Let's do an explicit memset(). Closes: CID#307545, CID#307543, CID#307541, CID#307536, CID#307536 Closes: CID#307534 Change-Id: I217ebbc92935aefaf55d19a14c93a24e5b8fce64 --- M src/rspro_util.c 1 file changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/78/31178/1 diff --git a/src/rspro_util.c b/src/rspro_util.c index 2ea6caf..23bb839 100644 --- a/src/rspro_util.c +++ b/src/rspro_util.c @@ -515,6 +515,7 @@ void bank_slot2rspro(BankSlot_t *out, const struct bank_slot *in) { + memset(out, 0, sizeof(*out)); out->bankId = in->bank_id; out->slotNr = in->slot_nr; } @@ -527,6 +528,7 @@ void client_slot2rspro(ClientSlot_t *out, const struct client_slot *in) { + memset(out, 0, sizeof(*out)); out->clientId = in->client_id; out->slotNr = in->slot_nr; } -- To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/31178 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-remsim Gerrit-Branch: master Gerrit-Change-Id: I217ebbc92935aefaf55d19a14c93a24e5b8fce64 Gerrit-Change-Number: 31178 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge@osmocom.org> Gerrit-MessageType: newchange
participants (1)
-
laforge