Skip to content

Commit fd398f0

Browse files
Vge0rgerlubos
authored andcommitted
nrf_security: Fix data cache buffer size in Cracen
The input variable in the function sx_blkcipher_ecb_simple is a pointer and not an array. So sizeof cannot be used to determine the array size. Replace this with the input_size variable which contains the correct iput size of the buffer. Signed-off-by: Georgios Vasilakis <[email protected]>
1 parent 919489e commit fd398f0

File tree

1 file changed

+1
-1
lines changed
  • subsys/nrf_security/src/drivers/cracen/sxsymcrypt/src

1 file changed

+1
-1
lines changed

subsys/nrf_security/src/drivers/cracen/sxsymcrypt/src/blkcipher.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ int sx_blkcipher_ecb_simple(uint8_t *key, size_t key_size, uint8_t *input, size_
444444
#if CONFIG_DCACHE
445445
sys_cache_data_flush_range(in_descs, sizeof(in_descs));
446446
sys_cache_data_flush_range(&out_desc, sizeof(out_desc));
447-
sys_cache_data_flush_range(input, sizeof(input));
447+
sys_cache_data_flush_range(input, input_size);
448448
sys_cache_data_flush_range(output, output_size);
449449
#endif
450450

0 commit comments

Comments
 (0)