crypto/bn/bn_prime.c:283: error: BUFFER_OVERRUN_L2
  Offset: [12+min(0, `ctx_passed->tos`), 13+max(0, `ctx_passed->tos`)] Size: 13 by call to `BN_MONT_CTX_set`.
Showing all 15 steps of the trace


crypto/bn/bn_prime.c:216:1: Parameter `ctx_passed->tos`
214.   	}
215.   
216. > int BN_is_prime_fasttest(const BIGNUM *a, int checks,
217.   		void (*callback)(int,int,void *),
218.   		BN_CTX *ctx_passed, void *cb_arg,

crypto/bn/bn_prime.c:257:17: Assignment
255.   	else
256.   		A = a;
257.   	A1 = &(ctx->bn[ctx->tos++]);
                       ^
258.   	A1_odd = &(ctx->bn[ctx->tos++]);
259.   	check = &(ctx->bn[ctx->tos++]);;

crypto/bn/bn_prime.c:258:21: Assignment
256.   		A = a;
257.   	A1 = &(ctx->bn[ctx->tos++]);
258.   	A1_odd = &(ctx->bn[ctx->tos++]);
                           ^
259.   	check = &(ctx->bn[ctx->tos++]);;
260.   

crypto/bn/bn_prime.c:259:20: Assignment
257.   	A1 = &(ctx->bn[ctx->tos++]);
258.   	A1_odd = &(ctx->bn[ctx->tos++]);
259.   	check = &(ctx->bn[ctx->tos++]);;
                          ^
260.   
261.   	/* compute A1 := A - 1 */

crypto/bn/bn_prime.c:283:7: Call
281.   	if (mont == NULL)
282.   		goto err;
283.   	if (!BN_MONT_CTX_set(mont, A, ctx))
             ^
284.   		goto err;
285.   	

crypto/bn/bn_mont.c:271:1: Parameter `ctx->tos`
  269.   	}
  270.   
  271. > int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
  272.   	{
  273.   	BIGNUM Ri,*R;

crypto/bn/bn_mont.c:300:8: Call
  298.   		tmod.neg=mod->neg;
  299.   							/* Ri = R^-1 mod N*/
  300.   		if ((BN_mod_inverse(&Ri,R,&tmod,ctx)) == NULL)
                ^
  301.   			goto err;
  302.   		BN_lshift(&Ri,&Ri,BN_BITS2);		/* R*Ri */

crypto/bn/bn_gcd.c:143:1: Parameter `ctx->tos`
    141.   
    142.   /* solves ax == 1 (mod n) */
    143. > BIGNUM *BN_mod_inverse(BIGNUM *in, BIGNUM *a, const BIGNUM *n, BN_CTX *ctx)
    144.   	{
    145.   	BIGNUM *A,*B,*X,*Y,*M,*D,*R;

crypto/bn/bn_gcd.c:158:2: Assignment
    156.   	M= &(ctx->bn[ctx->tos+4]);
    157.   	Y= &(ctx->bn[ctx->tos+5]);
    158.   	ctx->tos+=6;
            ^
    159.   	if (in == NULL)
    160.   		R=BN_new();

crypto/bn/bn_gcd.c:173:8: Call
    171.   	while (!BN_is_zero(B))
    172.   		{
    173.   		if (!BN_div(D,M,A,B,ctx)) goto err;
                  ^
    174.   		T=A;
    175.   		A=B;

crypto/bn/bn_div.c:122:1: <Offset trace>
120.   #else
121.   
122. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
123.   	   BN_CTX *ctx)
124.   	{

crypto/bn/bn_div.c:122:1: Parameter `ctx->tos`
      120.   #else
      121.   
      122. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
      123.   	   BN_CTX *ctx)
      124.   	{

crypto/bn/bn_div.c:122:1: <Length trace>
120.   #else
121.   
122. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
123.   	   BN_CTX *ctx)
124.   	{

crypto/bn/bn_div.c:122:1: Parameter `ctx->bn[*]`
      120.   #else
      121.   
      122. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
      123.   	   BN_CTX *ctx)
      124.   	{

crypto/bn/bn_div.c:153:3: Array access: Offset: [12+min(0, ctx_passed->tos), 13+max(0, ctx_passed->tos)] Size: 13 by call to `BN_MONT_CTX_set` 
      151.   	sdiv= &(ctx->bn[ctx->tos+2]);
      152.   	if (dv == NULL)
      153.   		res= &(ctx->bn[ctx->tos+3]);
               ^
      154.   	else	res=dv;
      155.   
