crypto: xts - Only add ecb if it is not already there
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 15 May 2025 08:34:04 +0000 (16:34 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 19 May 2025 05:48:20 +0000 (13:48 +0800)
commit270b6f13454cb7f2f7058c50df64df409c5dcf55
tree54937eef6c7288ee39d475f1554a291ebeb4ff83
parent3d73909bddc2ebb3224a8bc2e5ce00e9df70c15d
crypto: xts - Only add ecb if it is not already there

Only add ecb to the cipher name if it isn't already ecb.

Also use memcmp instead of strncmp since these strings are all
stored in an array of length CRYPTO_MAX_ALG_NAME.

Fixes: f1c131b45410 ("crypto: xts - Convert to skcipher")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/xts.c