Commit patch to bn.h that CVS decided to throw away during 'cvs update',
and initialize too_many because memset(..., 0, ...) is not used here.
diff --git a/crypto/bn/bn.h b/crypto/bn/bn.h
index 472eb2c..0d94df2 100644
--- a/crypto/bn/bn.h
+++ b/crypto/bn/bn.h
@@ -240,13 +240,15 @@
/* Used for temp variables */
#define BN_CTX_NUM 12
+#define BN_CTX_NUM_POS 12
typedef struct bignum_ctx
{
int tos;
- BIGNUM bn[BN_CTX_NUM+1];
+ BIGNUM bn[BN_CTX_NUM];
int flags;
int depth;
- int pos[BN_CTX_NUM+1];
+ int pos[BN_CTX_NUM_POS];
+ int too_many;
} BN_CTX;
typedef struct bn_blinding_st
diff --git a/crypto/bn/bn_ctx.c b/crypto/bn/bn_ctx.c
index f72b075..93d0815 100644
--- a/crypto/bn/bn_ctx.c
+++ b/crypto/bn/bn_ctx.c
@@ -87,6 +87,7 @@
ctx->tos = 0;
ctx->flags = 0;
ctx->depth = 0;
+ ctx->too_many = 0;
for (i = 0; i < BN_CTX_NUM; i++)
BN_init(&(ctx->bn[i]));
}