From af0225e4def3f4543c0f9e2a487748ca31d2447d Mon Sep 17 00:00:00 2001 From: Kusumit Ghoderao Date: Thu, 27 Apr 2023 20:06:58 +0530 Subject: [PATCH] change binary_string_parser for big-endian input Signed-off-by: Kusumit Ghoderao --- tests/suites/test_suite_psa_crypto.function | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/suites/test_suite_psa_crypto.function b/tests/suites/test_suite_psa_crypto.function index d1fc2582d..d4e8ac808 100644 --- a/tests/suites/test_suite_psa_crypto.function +++ b/tests/suites/test_suite_psa_crypto.function @@ -301,7 +301,7 @@ uint64_t parse_binary_string(data_t *bin_string) uint64_t result = 0; TEST_LE_U(bin_string->len, 8); for (size_t i = 0; i < bin_string->len; i++) { - result |= ((bin_string->x)[i]) << (i * 8); + result = (uint64_t) result | bin_string->x[i]; } exit: return result; /* returns 0 if len > 8 */