summaryrefslogtreecommitdiff
path: root/crypto/xts.c
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>2023-10-24 09:50:22 +0100
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>2023-10-24 09:50:22 +0100
commitac15e945240e41e00c9ccc4c5fc767caf662349e (patch)
tree8dc6c7c154ee77790508831a97e9bfd1e985f52e /crypto/xts.c
parent4525522e3b5323f640023ff768c1b57af43766fc (diff)
parent20c0d4fe1f8a911f4366571cac32749e9c0d10c6 (diff)
downloadlinux-crypto-ac15e945240e41e00c9ccc4c5fc767caf662349e.tar.gz
linux-crypto-ac15e945240e41e00c9ccc4c5fc767caf662349e.zip
Merge drm/drm-next into drm-intel-gt-next
Work that needs to land in drm-intel-gt-next depends on two patches only present in drm-intel-next, absence of which is causing a merge conflict: 3b918f4f0c8b ("drm/i915/pxp: Optimize GET_PARAM:PXP_STATUS") ac765b7018f6 ("drm/i915/pxp/mtl: intel_pxp_init_hw needs runtime-pm inside pm-complete") Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'crypto/xts.c')
-rw-r--r--crypto/xts.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/xts.c b/crypto/xts.c
index 09be909a..548b302c 100644
--- a/crypto/xts.c
+++ b/crypto/xts.c
@@ -396,10 +396,10 @@ static int xts_create(struct crypto_template *tmpl, struct rtattr **tb)
* cipher name.
*/
if (!strncmp(cipher_name, "ecb(", 4)) {
- unsigned len;
+ int len;
- len = strlcpy(ctx->name, cipher_name + 4, sizeof(ctx->name));
- if (len < 2 || len >= sizeof(ctx->name))
+ len = strscpy(ctx->name, cipher_name + 4, sizeof(ctx->name));
+ if (len < 2)
goto err_free_inst;
if (ctx->name[len - 1] != ')')