Change in osmo-ggsn[master]: initialize local variable addr in ippool_new()

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

Stefan Sperling gerrit-no-reply at lists.osmocom.org
Thu Nov 22 07:14:08 UTC 2018


Stefan Sperling has uploaded this change for review. ( https://gerrit.osmocom.org/11869


Change subject: initialize local variable addr in ippool_new()
......................................................................

initialize local variable addr in ippool_new()

Coverity points out that addr.len was potentially being used
uninitialized, via calls to in46a_inc(&addr).

Change-Id: Idb67394e5f4c2072380a33f46c848d92c4317245
Related: CID#174189
---
M lib/ippool.c
1 file changed, 1 insertion(+), 1 deletion(-)



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

diff --git a/lib/ippool.c b/lib/ippool.c
index 6ce3cda..bf8028a 100644
--- a/lib/ippool.c
+++ b/lib/ippool.c
@@ -202,7 +202,7 @@
 	/* Parse only first instance of pool for now */
 
 	int i;
-	struct in46_addr addr;
+	struct in46_addr addr = { 0 };
 	size_t addrprefixlen;
 	struct in46_addr stataddr;
 	size_t stataddrprefixlen;

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

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb67394e5f4c2072380a33f46c848d92c4317245
Gerrit-Change-Number: 11869
Gerrit-PatchSet: 1
Gerrit-Owner: Stefan Sperling <ssperling at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181122/030d401c/attachment.htm>


More information about the gerrit-log mailing list