summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-04-27 10:25:10 +0200
committerHarald Welte <laforge@gnumonks.org>2017-04-27 10:25:10 +0200
commit8a4895c0e5de4f04b5de85ed6bbae60edca3df9c (patch)
treeefb73b5cb3e0033cc2a8d8d100bfc5bc2e7c4928 /src
parent0b2f7153f2bfcb3897d34838105568fa90324bf5 (diff)
Uninitialized variable in ipa_ccm_make_id_resp_from_req()
We are allocating a buffer on the stack without initializing it, and then passing it into ipa_ccm_make_id_resp(). There is no real danger from this, as the buffer is only uninitialized if num_ies is 0, but let's memset() it for good style Change-Id: If5761a47b8cba73ddcc02a88cfa5c87c1970c04e Fixes: coverity CID#167040
Diffstat (limited to 'src')
-rw-r--r--src/gsm/ipa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gsm/ipa.c b/src/gsm/ipa.c
index 01bd0c58..2c0880ae 100644
--- a/src/gsm/ipa.c
+++ b/src/gsm/ipa.c
@@ -302,6 +302,8 @@ struct msgb *ipa_ccm_make_id_resp_from_req(const struct ipaccess_unit *dev,
unsigned int num_ies = 0;
const uint8_t *cur = data;
+ memset(ies, 0, sizeof(ies));
+
/* build a array of the IEIs */
while (len >= 2) {
uint8_t t_len, t_tag;