Change in libosmocore[master]: osmo-sim-test: initalize tlv_parsed structure with zeros

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.org
Wed Feb 26 11:04:46 UTC 2020


dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17269 )


Change subject: osmo-sim-test: initalize tlv_parsed structure with zeros
......................................................................

osmo-sim-test: initalize tlv_parsed structure with zeros

The variable struct tlv_parsed tp in dump_file() is not pre-initalized.
Lets make sure that it is pre-initalized to avoid accessing uninitalized
memory in error/corner cases.

Change-Id: I6b0209b966127a4195e6f4bcb43d49387c7646ce
Fixes: CID#208435
---
M utils/osmo-sim-test.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/69/17269/1

diff --git a/utils/osmo-sim-test.c b/utils/osmo-sim-test.c
index d33f1ba..52f146d 100644
--- a/utils/osmo-sim-test.c
+++ b/utils/osmo-sim-test.c
@@ -319,7 +319,7 @@
 
 static int dump_file(struct osim_chan_hdl *chan, uint16_t fid)
 {
-	struct tlv_parsed tp;
+	struct tlv_parsed tp = { 0 };
 	struct osim_fcp_fd_decoded ffdd;
 	struct msgb *msg, *rmsg;
 	int rc, i, offset;

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17269
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6b0209b966127a4195e6f4bcb43d49387c7646ce
Gerrit-Change-Number: 17269
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200226/b18b2633/attachment.htm>


More information about the gerrit-log mailing list