From 7181944223368eb06c1423f5fcc1e06b662ed31b Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Sat, 9 Dec 2017 07:16:51 +0000 Subject: In the middle of CRYPTO_gcm128_finish() there is a complicated #ifdef block which defines a variable late, after code. Place this chunk into a { subblock } to satisfy old compilers and old eyes. --- src/lib/libcrypto/modes/gcm128.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/lib/libcrypto/modes') diff --git a/src/lib/libcrypto/modes/gcm128.c b/src/lib/libcrypto/modes/gcm128.c index 69b1dd4f49..42291519bc 100644 --- a/src/lib/libcrypto/modes/gcm128.c +++ b/src/lib/libcrypto/modes/gcm128.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gcm128.c,v 1.20 2017/09/03 13:07:34 inoguchi Exp $ */ +/* $OpenBSD: gcm128.c,v 1.21 2017/12/09 07:16:51 deraadt Exp $ */ /* ==================================================================== * Copyright (c) 2010 The OpenSSL Project. All rights reserved. * @@ -1515,13 +1515,15 @@ int CRYPTO_gcm128_finish(GCM128_CONTEXT *ctx,const unsigned char *tag, alen = BSWAP8(alen); clen = BSWAP8(clen); #else - u8 *p = ctx->len.c; + { + u8 *p = ctx->len.c; - ctx->len.u[0] = alen; - ctx->len.u[1] = clen; + ctx->len.u[0] = alen; + ctx->len.u[1] = clen; - alen = (u64)GETU32(p) <<32|GETU32(p+4); - clen = (u64)GETU32(p+8)<<32|GETU32(p+12); + alen = (u64)GETU32(p) <<32|GETU32(p+4); + clen = (u64)GETU32(p+8)<<32|GETU32(p+12); + } #endif #endif -- cgit v1.2.3-55-g6feb