Skip to content

Commit 1cbdc3c

Browse files
committed
Merge branch 'sizecheck'
2 parents 349779d + 45fc5e5 commit 1cbdc3c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/memory/memory.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,9 @@ bool memory_set_encrypted_seed_and_hmac(const uint8_t* encrypted_seed_and_hmac,
502502
{
503503
chunk_1_t chunk = {0};
504504
CLEANUP_CHUNK(chunk);
505+
if (len > sizeof(chunk.fields.encrypted_seed_and_hmac)) {
506+
return false;
507+
}
505508
_read_chunk(CHUNK_1, chunk_bytes);
506509
chunk.fields.encrypted_seed_and_hmac_len = len;
507510
memset(

0 commit comments

Comments
 (0)