mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-08-12 01:31:21 +02:00
wc_InitRsaKey_Id cast the byte array key->id to word32* and dereferenced it to recover the SE050 key id. key->id is a byte array with no alignment guarantee inside RsaKey, so the dereference is an unaligned 32-bit read that faults or mis-reads on strict-alignment targets, and it violates strict aliasing. Read the value with readUnalignedWord32 instead, which does an alignment-safe byte copy, matching wc_ecc_init_id. Fixes F-6624.