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(¶m_buffer[19], 0x0, 0) is called. But this is an undefined behaviour in C even if size is 0, as ¶m_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: Loic Domaigne <tech@domaigne.com> |
||
|---|---|---|
| .. | ||
| CMakeLists.txt | ||
| crypto_ataes132a_priv.h | ||
| crypto_ataes132a.c | ||
| crypto_cc23x0.c | ||
| crypto_intel_sha_priv.h | ||
| crypto_intel_sha_registers.h | ||
| crypto_intel_sha.c | ||
| crypto_it8xxx2_sha_v2.c | ||
| crypto_it8xxx2_sha.c | ||
| crypto_it51xxx_sha.c | ||
| crypto_mchp_xec_symcr.c | ||
| crypto_mcux_dcp.c | ||
| crypto_mtls_shim.c | ||
| crypto_npcx_sha.c | ||
| crypto_nrf_ecb.c | ||
| crypto_rts5912_priv.h | ||
| crypto_rts5912_sha.c | ||
| crypto_si32.c | ||
| crypto_smartbond.c | ||
| crypto_stm32_priv.h | ||
| crypto_stm32.c | ||
| Kconfig | ||
| Kconfig.ataes132a | ||
| Kconfig.cc23x0 | ||
| Kconfig.intel | ||
| Kconfig.it8xxx2 | ||
| Kconfig.it51xxx | ||
| Kconfig.mcux_dcp | ||
| Kconfig.npcx | ||
| Kconfig.nrf_ecb | ||
| Kconfig.rts5912 | ||
| Kconfig.si32 | ||
| Kconfig.smartbond | ||
| Kconfig.stm32 | ||
| Kconfig.xec | ||