mirror of https://gerrit.osmocom.org/libosmocore
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
This commit is contained in:
parent
0b2f7153f2
commit
8a4895c0e5
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue