Skip to content

Commit 2cd155b

Browse files
author
Arto Kinnunen
committed
Merge branch 'release_internal' into release_external
* release_internal: Fix issues found by coverity Fix NUCLEO_F401RE compilation issue
2 parents c5ee9e4 + 8ba8ff4 commit 2cd155b

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

source/6LoWPAN/ws/ws_pae_nvm_store.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ static int8_t ws_pae_nvm_store_read(const char *file_name, nvm_tlv_list_t *tlv_l
161161

162162
while (list_count-- > 0) {
163163
nvm_tlv_entry_t entry_header;
164+
memset(&entry_header, 0, sizeof(nvm_tlv_entry_t));
164165
n_bytes = fread(&entry_header.tag, 1, NVM_TLV_FIXED_LEN, fp);
165166
if (n_bytes != NVM_TLV_FIXED_LEN) {
166167
failure = true;

source/Security/protocols/sec_prot_keys.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ void sec_prot_keys_gtkl_set(sec_prot_gtk_keys_t *gtks, uint8_t gtkl)
191191

192192
bool sec_prot_keys_gtk_is_live(sec_prot_gtk_keys_t *gtks, uint8_t index)
193193
{
194-
if (index > GTK_NUM || !gtks->gtk[index].live) {
194+
if (index >= GTK_NUM || !gtks->gtk[index].live) {
195195
return false;
196196
}
197197

@@ -200,7 +200,7 @@ bool sec_prot_keys_gtk_is_live(sec_prot_gtk_keys_t *gtks, uint8_t index)
200200

201201
int8_t sec_prot_keys_gtk_insert_index_set(sec_prot_gtk_keys_t *gtks, uint8_t index)
202202
{
203-
if (index > GTK_NUM || !gtks->gtk[index].set) {
203+
if (index >= GTK_NUM || !gtks->gtk[index].set) {
204204
return -1;
205205
}
206206

source/Security/protocols/tls_sec_prot/tls_sec_prot_lib.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
*/
1717

1818
#include "nsconfig.h"
19+
#ifdef HAVE_WS
20+
1921
#include <string.h>
2022
#include <randLIB.h>
2123
#include "ns_types.h"
@@ -37,8 +39,6 @@
3739

3840
#include "mbedtls/ssl_internal.h"
3941

40-
#ifdef HAVE_WS
41-
4242
#define TRACE_GROUP "tlsl"
4343

4444
#define TLS_HANDSHAKE_TIMEOUT_MIN 25000

0 commit comments

Comments
 (0)