apps/dh.c:228: error: BUFFER_OVERRUN_L3
  Offset: [3, +oo] (⇐ [0, +oo] + 3) Size: [2, +oo] by call to `DH_check`.
Showing all 23 steps of the trace


apps/dh.c:214:3: Call
212.   	if (text)
213.   		{
214.   		DHparams_print(out,dh);
         ^
215.   #ifdef undef
216.   		printf("p=");

crypto/asn1/t_pkey.c:281:1: Parameter `x->p->top`
  279.   #endif
  280.   
  281. > int DHparams_print(BIO *bp, DH *x)
  282.   	{
  283.   	unsigned char *m=NULL;

crypto/asn1/t_pkey.c:286:4: Call
  284.   	int reason=ERR_R_BUF_LIB,i,ret=0;
  285.   
  286.   	i=BN_num_bytes(x->p);
            ^
  287.   	m=(unsigned char *)Malloc((unsigned int)i+10);
  288.   	if (m == NULL)

crypto/bn/bn_lib.c:238:1: Parameter `a->top`
    236.   	}
    237.   
    238. > int BN_num_bits(BIGNUM *a)
    239.   	{
    240.   	BN_ULONG l;

apps/dh.c:228:8: Call
226.   	if (check)
227.   		{
228.   		if (!DH_check(dh,&i))
              ^
229.   			{
230.   			ERR_print_errors(bio_err);

crypto/dh/dh_check.c:73:1: Parameter `dh->p->top`
  71.    */
  72.   
  73. > int DH_check(DH *dh, int *ret)
  74.   	{
  75.   	int ok=0;

crypto/dh/dh_check.c:105:7: Call
  103.   		*ret|=DH_UNABLE_TO_CHECK_GENERATOR;
  104.   
  105.   	if (!BN_is_prime(dh->p,BN_prime_checks,NULL,ctx,NULL))
               ^
  106.   		*ret|=DH_CHECK_P_NOT_PRIME;
  107.   	else

crypto/bn/bn_prime.c:154:1: Parameter `a->top`
    152.   	}
    153.   
    154. > int BN_is_prime(BIGNUM *a, int checks, void (*callback)(int,int,void *),
    155.   	     BN_CTX *ctx_passed, void *cb_arg)
    156.   	{

crypto/bn/bn_prime.c:175:7: Call
    173.   
    174.   	/* Setup the montgomery structure */
    175.   	if (!BN_MONT_CTX_set(mont,a,ctx2)) goto err;
                 ^
    176.   
    177.   	for (i=0; i<checks; i++)

crypto/bn/bn_mont.c:301:1: Parameter `*mont->N.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:307:2: Call
      305.   	BN_init(&Ri);
      306.   	R= &(mont->RR);					/* grab RR as a temp */
      307.   	BN_copy(&(mont->N),mod);			/* Set N */
              ^
      308.   
      309.   #ifdef BN_RECURSION_MONT

crypto/bn/bn_lib.c:499:1: Parameter `*a->d`
        497.   	}
        498.   
        499. > BIGNUM *BN_copy(BIGNUM *a, BIGNUM *b)
        500.   	{
        501.   	int i;

crypto/bn/bn_prime.c:180:5: Call
    178.   		{
    179.   		if (!BN_rand(check,BN_num_bits(a)-1,0,0)) goto err;
    180.   		j=witness(check,a,ctx,ctx2,mont);
               ^
    181.   		if (j == -1) goto err;
    182.   		if (j)

crypto/bn/bn_prime.c:203:1: Parameter `*mont->N.d`
      201.   #define RECP_MUL_MOD
      202.   
      203. > static int witness(BIGNUM *a, BIGNUM *n, BN_CTX *ctx, BN_CTX *ctx2,
      204.   	     BN_MONT_CTX *mont)
      205.   	{

crypto/bn/bn_prime.c:226:7: Call
      224.   	k=BN_num_bits(n1);
      225.   
      226.   	if (!BN_to_montgomery(mont_one,BN_value_one(),mont,ctx2)) goto err;
                   ^
      227.   	if (!BN_to_montgomery(mont_n1,n1,mont,ctx2)) goto err;
      228.   	if (!BN_to_montgomery(mont_a,a,mont,ctx2)) goto err;

crypto/bn/bn_mont.c:71:1: Parameter `*mont->N.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:101:7: Call
        99.   		}
        100.   	/* reduce from aRR to aR */
        101.   	if (!BN_from_montgomery(r,tmp,mont,ctx)) goto err;
                     ^
        102.   	ctx->tos-=2;
        103.   	return(1);

crypto/bn/bn_mont.c:108:1: Parameter `*mont->N.d`
          106.   	}
          107.   
          108. > int BN_from_montgomery(BIGNUM *ret, BIGNUM *a, BN_MONT_CTX *mont,
          109.   	     BN_CTX *ctx)
          110.   	{

crypto/bn/bn_mont.c:137:3: Assignment
          135.   
          136.   		r->neg=a->neg^n->neg;
          137.   		np=n->d;
                   ^
          138.   		rp=r->d;
          139.   		nrp= &(r->d[nl]);

crypto/bn/bn_mont.c:157:6: Call
          155.   		for (i=0; i<nl; i++)
          156.   			{
          157.   			v=bn_mul_add_words(rp,np,nl,(rp[0]*n0)&BN_MASK2);
                      ^
          158.   			nrp++;
          159.   			rp++;

crypto/bn/bn_asm.c:144:1: <Length trace>
142.   #else
143.   
144. > BN_ULONG bn_mul_add_words(BN_ULONG *rp, BN_ULONG *ap, int num, BN_ULONG w)
145.   	{
146.   	BN_ULONG c=0;

crypto/bn/bn_asm.c:144:1: Parameter `*ap`
            142.   #else
            143.   
            144. > BN_ULONG bn_mul_add_words(BN_ULONG *rp, BN_ULONG *ap, int num, BN_ULONG w)
            145.   	{
            146.   	BN_ULONG c=0;

crypto/bn/bn_asm.c:163:3: Array access: Offset: [3, +oo] (⇐ [0, +oo] + 3) Size: [2, +oo] by call to `DH_check` 
            161.   		mul_add(rp[2],ap[2],bl,bh,c);
            162.   		if (--num == 0) break;
            163.   		mul_add(rp[3],ap[3],bl,bh,c);
                     ^
            164.   		if (--num == 0) break;
            165.   		ap+=4;
