Skip to content
Commit 28f37e52 authored by Loic Domaigne's avatar Loic Domaigne Committed by Daniel DeGrasse
Browse files

drivers: crypto: crypto_ataes132a fix memset undefined behavior



Coverity reported a memory - illegal accesses when using memset in
ataes132a_aes_ecb_block(). This can happen when the input block is
exactly 16 bytes: memset(&param_buffer[19], 0x0, 0) is called. But this
is an undefined behaviour in C even if size is 0, as &param_buffer[19]
is an invalid pointer.

The fix consists of simply skipping memset() in this case, since there's
nothing to zero out.

Coverity CID: 434642

Signed-off-by: default avatarLoic Domaigne <tech@domaigne.com>
parent 81f95f15
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment