summaryrefslogtreecommitdiffstats
path: root/crypto/aegis128-core.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2020-07-21 08:05:54 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2020-07-31 10:09:00 +0200
commit958ea4e0d64e39d039245e6450f625108833e522 (patch)
tree2154c28f985065016cd67b4cd7aef640b947068b /crypto/aegis128-core.c
parentcrypto: marvell/cesa - irq balance (diff)
downloadlinux-958ea4e0d64e39d039245e6450f625108833e522.tar.xz
linux-958ea4e0d64e39d039245e6450f625108833e522.zip
crypto: xts - Replace memcpy() invocation with simple assignment
Colin reports that the memcpy() call in xts_cts_final() trigggers a "Overlapping buffer in memory copy" warning in Coverity, which is a false postive, given that tail is guaranteed to be smaller than or equal to the distance between source and destination. However, given that any additional bytes that we copy will be ignored anyway, we can simply copy XTS_BLOCK_SIZE unconditionally, which means we can use struct assignment of the array members instead, which is likely to be more efficient as well. Addresses-Coverity: ("Overlapping buffer in memory copy") Fixes: 8083b1bf8163 ("crypto: xts - add support for ciphertext stealing") Reported-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/aegis128-core.c')
0 files changed, 0 insertions, 0 deletions