Merge commit '514ed9930160b041a598b922a3b69789e2fb6fcf'

* commit '514ed9930160b041a598b922a3b69789e2fb6fcf':
  Squashed 'features/nanostack/sal-stack-nanostack/' changes from c5ee9e4..2cd155b
pull/9838/head
Arto Kinnunen 2019-02-26 11:04:54 +02:00
commit 650f9d9887
3 changed files with 5 additions and 4 deletions

View File

@ -161,6 +161,7 @@ static int8_t ws_pae_nvm_store_read(const char *file_name, nvm_tlv_list_t *tlv_l
while (list_count-- > 0) {
nvm_tlv_entry_t entry_header;
memset(&entry_header, 0, sizeof(nvm_tlv_entry_t));
n_bytes = fread(&entry_header.tag, 1, NVM_TLV_FIXED_LEN, fp);
if (n_bytes != NVM_TLV_FIXED_LEN) {
failure = true;

View File

@ -191,7 +191,7 @@ void sec_prot_keys_gtkl_set(sec_prot_gtk_keys_t *gtks, uint8_t gtkl)
bool sec_prot_keys_gtk_is_live(sec_prot_gtk_keys_t *gtks, uint8_t index)
{
if (index > GTK_NUM || !gtks->gtk[index].live) {
if (index >= GTK_NUM || !gtks->gtk[index].live) {
return false;
}
@ -200,7 +200,7 @@ bool sec_prot_keys_gtk_is_live(sec_prot_gtk_keys_t *gtks, uint8_t index)
int8_t sec_prot_keys_gtk_insert_index_set(sec_prot_gtk_keys_t *gtks, uint8_t index)
{
if (index > GTK_NUM || !gtks->gtk[index].set) {
if (index >= GTK_NUM || !gtks->gtk[index].set) {
return -1;
}

View File

@ -16,6 +16,8 @@
*/
#include "nsconfig.h"
#ifdef HAVE_WS
#include <string.h>
#include <randLIB.h>
#include "ns_types.h"
@ -37,8 +39,6 @@
#include "mbedtls/ssl_internal.h"
#ifdef HAVE_WS
#define TRACE_GROUP "tlsl"
#define TLS_HANDSHAKE_TIMEOUT_MIN 25000