Skip to content
This repository was archived by the owner on Mar 5, 2024. It is now read-only.

tinycrypt: fix asan report error #53

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/source/aes_encrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static inline unsigned int rotword(unsigned int a)
return (((a) >> 24)|((a) << 8));
}

#define subbyte(a, o)(sbox[((a) >> (o))&0xff] << (o))
#define subbyte(a, o)((uint32_t)sbox[((a) >> (o))&0xff] << (o))
#define subword(a)(subbyte(a, 24)|subbyte(a, 16)|subbyte(a, 8)|subbyte(a, 0))

int tc_aes128_set_encrypt_key(TCAesKeySched_t s, const uint8_t *k)
Expand Down