mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-04-28 19:06:20 +00:00
Fix potential crash on loading dkek.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
001d076fdf
commit
25c93c279f
1 changed files with 1 additions and 1 deletions
|
|
@ -110,7 +110,7 @@ int mse_decrypt_ct(uint8_t *data, size_t len) {
|
|||
|
||||
int load_dkek(uint8_t id, uint8_t *dkek) {
|
||||
file_t *tf = search_file(EF_DKEK + id);
|
||||
if (!tf) {
|
||||
if (!file_has_data(tf)) {
|
||||
return CCID_ERR_FILE_NOT_FOUND;
|
||||
}
|
||||
memcpy(dkek, file_get_data(tf), DKEK_KEY_SIZE);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue