From 67badb44513f09089080ea18f0c8ca3de7290151 Mon Sep 17 00:00:00 2001 From: k-stachowiak Date: Tue, 22 Oct 2019 13:25:06 +0200 Subject: [PATCH] Secure array index in its bounds --- library/gcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/gcm.c b/library/gcm.c index 5121a7ac7..2ee5256c6 100644 --- a/library/gcm.c +++ b/library/gcm.c @@ -246,7 +246,7 @@ static void gcm_mult( mbedtls_gcm_context *ctx, const unsigned char x[16], for( i = 15; i >= 0; i-- ) { lo = x[i] & 0xf; - hi = x[i] >> 4; + hi = ( x[i] >> 4 ) & 0xf; if( i != 15 ) {