summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorbcook <>2016-07-17 22:01:01 +0000
committerbcook <>2016-07-17 22:01:01 +0000
commitb6a7c7fe4bccdc5ae0b1fdc9395ffc8977436466 (patch)
tree425d51bcd426abbb2eb822c25490cd38a24aae30 /src/lib
parentedcd46ce5a08d7ef09cf6621e227db77d70caec8 (diff)
downloadopenbsd-b6a7c7fe4bccdc5ae0b1fdc9395ffc8977436466.tar.gz
openbsd-b6a7c7fe4bccdc5ae0b1fdc9395ffc8977436466.tar.bz2
openbsd-b6a7c7fe4bccdc5ae0b1fdc9395ffc8977436466.zip
use memset to initialize the union
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/bn/bn_nist.c6
-rw-r--r--src/lib/libssl/src/crypto/bn/bn_nist.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/libcrypto/bn/bn_nist.c b/src/lib/libcrypto/bn/bn_nist.c
index 44bf0cb0ce..9a0970138d 100644
--- a/src/lib/libcrypto/bn/bn_nist.c
+++ b/src/lib/libcrypto/bn/bn_nist.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_nist.c,v 1.16 2016/07/17 21:21:40 bcook Exp $ */ 1/* $OpenBSD: bn_nist.c,v 1.17 2016/07/17 22:01:01 bcook Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project 3 * Written by Nils Larsch for the OpenSSL project
4 */ 4 */
@@ -59,6 +59,7 @@
59#include <machine/endian.h> 59#include <machine/endian.h>
60 60
61#include <stdint.h> 61#include <stdint.h>
62#include <string.h>
62 63
63#include "bn_lcl.h" 64#include "bn_lcl.h"
64 65
@@ -568,7 +569,8 @@ BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, BN_CTX *ctx)
568 BN_ULONG bn[BN_NIST_224_TOP]; 569 BN_ULONG bn[BN_NIST_224_TOP];
569 unsigned int ui[BN_NIST_224_TOP * 570 unsigned int ui[BN_NIST_224_TOP *
570 sizeof(BN_ULONG) / sizeof(unsigned int)]; 571 sizeof(BN_ULONG) / sizeof(unsigned int)];
571 } buf = {0}; 572 } buf;
573 memset(&buf, 0, sizeof(buf));
572 BN_ULONG c_d[BN_NIST_224_TOP], *res; 574 BN_ULONG c_d[BN_NIST_224_TOP], *res;
573 uintptr_t mask; 575 uintptr_t mask;
574 union { 576 union {
diff --git a/src/lib/libssl/src/crypto/bn/bn_nist.c b/src/lib/libssl/src/crypto/bn/bn_nist.c
index 44bf0cb0ce..9a0970138d 100644
--- a/src/lib/libssl/src/crypto/bn/bn_nist.c
+++ b/src/lib/libssl/src/crypto/bn/bn_nist.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_nist.c,v 1.16 2016/07/17 21:21:40 bcook Exp $ */ 1/* $OpenBSD: bn_nist.c,v 1.17 2016/07/17 22:01:01 bcook Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project 3 * Written by Nils Larsch for the OpenSSL project
4 */ 4 */
@@ -59,6 +59,7 @@
59#include <machine/endian.h> 59#include <machine/endian.h>
60 60
61#include <stdint.h> 61#include <stdint.h>
62#include <string.h>
62 63
63#include "bn_lcl.h" 64#include "bn_lcl.h"
64 65
@@ -568,7 +569,8 @@ BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *field, BN_CTX *ctx)
568 BN_ULONG bn[BN_NIST_224_TOP]; 569 BN_ULONG bn[BN_NIST_224_TOP];
569 unsigned int ui[BN_NIST_224_TOP * 570 unsigned int ui[BN_NIST_224_TOP *
570 sizeof(BN_ULONG) / sizeof(unsigned int)]; 571 sizeof(BN_ULONG) / sizeof(unsigned int)];
571 } buf = {0}; 572 } buf;
573 memset(&buf, 0, sizeof(buf));
572 BN_ULONG c_d[BN_NIST_224_TOP], *res; 574 BN_ULONG c_d[BN_NIST_224_TOP], *res;
573 uintptr_t mask; 575 uintptr_t mask;
574 union { 576 union {