commit | 437500c5b1a7e2f4e4cbe864bd6c3deaeda6ff17 | [log] [tgz] |
---|---|---|
author | Dave Rodgman <dave.rodgman@arm.com> | Tue Sep 19 21:36:43 2023 +0100 |
committer | Dave Rodgman <dave.rodgman@arm.com> | Tue Sep 19 21:52:13 2023 +0100 |
tree | b945483076089a0e69a7c7100a48fe8709f93c56 | |
parent | 6be4bcff161cd535de566e7a35b6677b3bf84a75 [diff] [blame] |
Fix MSVC type complaint Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
diff --git a/library/cipher.c b/library/cipher.c index 3274f38..bead187 100644 --- a/library/cipher.c +++ b/library/cipher.c
@@ -903,7 +903,7 @@ *data_len = 0; - for (int i = input_len - 1; i >= 0; i--) { + for (ptrdiff_t i = (ptrdiff_t) (input_len) - 1; i >= 0; i--) { mbedtls_ct_condition_t is_nonzero = mbedtls_ct_bool(input[i]); mbedtls_ct_condition_t hit_first_nonzero = mbedtls_ct_bool_and(is_nonzero, in_padding);