fixed 323588 Uninitialized scalar variable
accessing uninitialized data with mlock is undefined behavior
This commit is contained in:
parent
21ee26b070
commit
dca02dd9a0
@ -2062,7 +2062,7 @@ coolkey_process_combined_object(sc_card_t *card, coolkey_private_data_t *priv, u
|
||||
}
|
||||
memcpy(priv->token_name, &decompressed_header->token_name[0],
|
||||
decompressed_header->token_name_length);
|
||||
priv->token_name[decompressed_header->token_name_length] = 0;
|
||||
priv->token_name[decompressed_header->token_name_length] = '\0';
|
||||
priv->token_name_length = decompressed_header->token_name_length;
|
||||
|
||||
|
||||
|
@ -902,7 +902,7 @@ void *sc_mem_secure_alloc(size_t len)
|
||||
len = pages * page_size;
|
||||
}
|
||||
|
||||
p = malloc(len);
|
||||
p = calloc(1, len);
|
||||
if (p == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user