crypto/bn/bn_prime.c:188: error: BUFFER_OVERRUN_L3
  Offset: [7, +oo] (⇐ [0, +oo] + 7) Size: [0, +oo] by call to `witness`.
Showing all 17 steps of the trace


crypto/bn/bn_prime.c:183:7: Call
181.   
182.   	/* Setup the montgomery structure */
183.   	if (!BN_MONT_CTX_set(mont,a,ctx2)) goto err;
             ^
184.   
185.   	for (i=0; i<checks; i++)

crypto/bn/bn_mont.c:301:1: Parameter `*mont->RR.d`
  299.   	}
  300.   
  301. > int BN_MONT_CTX_set(BN_MONT_CTX *mont, BIGNUM *mod, BN_CTX *ctx)
  302.   	{
  303.   	BIGNUM Ri,*R;

crypto/bn/bn_mont.c:319:3: Call
  317.   
  318.   		mont->ri=(BN_num_bits(mod)+(BN_BITS2-1))/BN_BITS2*BN_BITS2;
  319.   		BN_zero(R);
           ^
  320.   		BN_set_bit(R,BN_BITS2);
  321.   		/* I was bad, this modification of a passed variable was

crypto/bn/bn_lib.c:548:1: Parameter `*a->d`
    546.   	}
    547.   
    548. > int BN_set_word(BIGNUM *a, BN_ULONG w)
    549.   	{
    550.   	int i,n;

crypto/bn/bn_mont.c:320:3: Call
  318.   		mont->ri=(BN_num_bits(mod)+(BN_BITS2-1))/BN_BITS2*BN_BITS2;
  319.   		BN_zero(R);
  320.   		BN_set_bit(R,BN_BITS2);
           ^
  321.   		/* I was bad, this modification of a passed variable was
  322.   		 * breaking the multithreaded stuff :-(

crypto/bn/bn_lib.c:688:1: Parameter `*a->d`
    686.   	}
    687.   
    688. > int BN_set_bit(BIGNUM *a, int n)
    689.   	{
    690.   	int i,j,k;

crypto/bn/bn_prime.c:188:5: Call
186.   		{
187.   		if (!BN_rand(check,BN_num_bits(a)-1,0,0)) goto err;
188.   		j=witness(check,a,ctx,ctx2,mont);
           ^
189.   		if (j == -1) goto err;
190.   		if (j)

crypto/bn/bn_prime.c:211:1: Parameter `*mont->RR.d`
  209.   #define RECP_MUL_MOD
  210.   
  211. > static int witness(BIGNUM *a, BIGNUM *n, BN_CTX *ctx, BN_CTX *ctx2,
  212.   	     BN_MONT_CTX *mont)
  213.   	{

crypto/bn/bn_prime.c:234:7: Call
  232.   	k=BN_num_bits(n1);
  233.   
  234.   	if (!BN_to_montgomery(mont_one,BN_value_one(),mont,ctx2)) goto err;
               ^
  235.   	if (!BN_to_montgomery(mont_n1,n1,mont,ctx2)) goto err;
  236.   	if (!BN_to_montgomery(mont_a,a,mont,ctx2)) goto err;

crypto/bn/bn_mont.c:71:1: Parameter `*b->d`
    69.   #define MONT_WORD
    70.   
    71. > int BN_mod_mul_montgomery(BIGNUM *r, BIGNUM *a, BIGNUM *b, BN_MONT_CTX *mont,
    72.   	     BN_CTX *ctx)
    73.   	{

crypto/bn/bn_mont.c:98:8: Call
    96.   	else
    97.   		{
    98.   		if (!BN_mul(tmp,a,b,ctx)) goto err;
                  ^
    99.   		}
    100.   	/* reduce from aRR to aR */

crypto/bn/bn_mul.c:560:1: Parameter `*b->d`
      558.   #endif
      559.   
      560. > int BN_mul(BIGNUM *r, BIGNUM *a, BIGNUM *b, BN_CTX *ctx)
      561.   	{
      562.   	int top,al,bl;

crypto/bn/bn_mul.c:679:4: Call
      677.   			{
      678.   			bn_wexpand(a,k);
      679.   			bn_wexpand(b,k);
                ^
      680.   			bn_wexpand(t,k*4);
      681.   			bn_wexpand(rr,k*4);

crypto/bn/bn_lib.c:344:1: <Length trace>
342.   	}
343.   
344. > BIGNUM *bn_expand2(BIGNUM *b, int words)
345.   	{
346.   	BN_ULONG *A,*B,*a;

crypto/bn/bn_lib.c:344:1: Parameter `*b->d`
        342.   	}
        343.   
        344. > BIGNUM *bn_expand2(BIGNUM *b, int words)
        345.   	{
        346.   	BN_ULONG *A,*B,*a;

crypto/bn/bn_lib.c:367:3: Assignment
        365.   memset(A,0x5c,sizeof(BN_ULONG)*(words+1));
        366.   #if 1
        367.   		B=b->d;
                 ^
        368.   		/* Check if the previous number needs to be copied */
        369.   		if (B != NULL)

crypto/bn/bn_lib.c:377:43: Array access: Offset: [7, +oo] (⇐ [0, +oo] + 7) Size: [0, +oo] by call to `witness` 
        375.   				{
        376.   				A[0]=B[0]; A[1]=B[1]; A[2]=B[2]; A[3]=B[3];
        377.   				A[4]=B[4]; A[5]=B[5]; A[6]=B[6]; A[7]=B[7];
                                                         ^
        378.   				A+=8;
        379.   				B+=8;
