Commit patch to bn.h that CVS decided to throw away during 'cvs update',
authorBodo Möller <bodo@openssl.org>
Sat, 5 Feb 2000 20:39:26 +0000 (20:39 +0000)
committerBodo Möller <bodo@openssl.org>
Sat, 5 Feb 2000 20:39:26 +0000 (20:39 +0000)
and initialize too_many because memset(..., 0, ...) is not used here.

crypto/bn/bn.h
crypto/bn/bn_ctx.c

index 472eb2c616efcd31389c6ee7de95a203059be73f..0d94df255dbd8125d1f4fb13cab907837d2512c2 100644 (file)
@@ -240,13 +240,15 @@ typedef struct bignum_st
 
 /* 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
index f72b075ccfb00c21cca87625e336d3125d3c5944..93d08152f732360a7dfa851ef54403250d7703d1 100644 (file)
@@ -87,6 +87,7 @@ void BN_CTX_init(BN_CTX *ctx)
        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]));
        }