summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Cook <bcook@cvs.openbsd.org>2016-07-17 22:01:02 +0000
committerBrent Cook <bcook@cvs.openbsd.org>2016-07-17 22:01:02 +0000
commit2532d3f290f7b344be1a8da962c74fc311689601 (patch)
treef1f24ebd637e6a0612673f7200f91a02d33e5610
parentafe544c936916757c73f016971caa4ed8b27840b (diff)
use memset to initialize the union
-rw-r--r--lib/libcrypto/bn/bn_nist.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libcrypto/bn/bn_nist.c b/lib/libcrypto/bn/bn_nist.c
index 44bf0cb0ce3..9a0970138d6 100644
--- a/lib/libcrypto/bn/bn_nist.c
+++ b/lib/libcrypto/bn/bn_nist.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bn_nist.c,v 1.16 2016/07/17 21:21:40 bcook Exp $ */
+/* $OpenBSD: bn_nist.c,v 1.17 2016/07/17 22:01:01 bcook Exp $ */
/*
* Written by Nils Larsch for the OpenSSL project
*/
@@ -59,6 +59,7 @@
#include <machine/endian.h>
#include <stdint.h>
+#include <string.h>
#include "bn_lcl.h"
@@ -568,7 +569,8 @@ BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, BN_CTX *ctx)
BN_ULONG bn[BN_NIST_224_TOP];
unsigned int ui[BN_NIST_224_TOP *
sizeof(BN_ULONG) / sizeof(unsigned int)];
- } buf = {0};
+ } buf;
+ memset(&buf, 0, sizeof(buf));
BN_ULONG c_d[BN_NIST_224_TOP], *res;
uintptr_t mask;
union {