crypto/bn/bn_prime.c:227: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 67108856] by call to `witness`.
Showing all 30 steps of the trace


crypto/bn/bn_prime.c:153:1: Parameter `a->top`
151.   }
152.   
153. > int BN_is_prime_fasttest_ex(const BIGNUM *a, int checks, BN_CTX *ctx_passed,
154.                               int do_trial_division, BN_GENCB *cb)
155.   {

crypto/bn/bn_prime.c:162:9: Call
160.       BN_MONT_CTX *mont = NULL;
161.   
162.       if (BN_cmp(a, BN_value_one()) <= 0)
               ^
163.           return 0;
164.   

crypto/bn/bn_lib.c:577:1: Parameter `a->top`
  575.   }
  576.   
  577. > int BN_cmp(const BIGNUM *a, const BIGNUM *b)
  578.   {
  579.       int i;

crypto/bn/bn_prime.c:169:10: Call
167.   
168.       /* first look for small factors */
169.       if (!BN_is_odd(a))
                ^
170.           /* a is even => a is prime if and only if a == 2 */
171.           return BN_is_word(a, 2);

crypto/bn/bn_lib.c:867:1: Parameter `a->top`
  865.   }
  866.   
  867. > int BN_is_odd(const BIGNUM *a)
  868.   {
  869.       return (a->top > 0) && (a->d[0] & 1);

crypto/bn/bn_prime.c:197:10: Call
195.   
196.       /* compute A1 := a - 1 */
197.       if (!BN_copy(A1, a))
                ^
198.           goto err;
199.       if (!BN_sub_word(A1, 1))

crypto/bn/bn_lib.c:323:1: Parameter `b->top`
  321.   }
  322.   
  323. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
  324.   {
  325.       bn_check_top(b);

crypto/bn/bn_prime.c:217:10: Call
215.       if (mont == NULL)
216.           goto err;
217.       if (!BN_MONT_CTX_set(mont, a, ctx))
                ^
218.           goto err;
219.   

crypto/bn/bn_mont.c:252:9: Call
  250.       BIGNUM *Ri, *R;
  251.   
  252.       if (BN_is_zero(mod))
                 ^
  253.           return 0;
  254.   

crypto/bn/bn_lib.c:852:1: Parameter `a->top`
    850.   }
    851.   
    852. > int BN_is_zero(const BIGNUM *a)
    853.   {
    854.       return a->top == 0;

crypto/bn/bn_prime.c:227:13: Call
225.           /* now 1 <= check < a */
226.   
227.           j = witness(check, a, A1, A1_odd, k, ctx, mont);
                   ^
228.           if (j == -1)
229.               goto err;

crypto/bn/bn_prime.c:249:1: Parameter `a->top`
  247.   }
  248.   
  249. > static int witness(BIGNUM *w, const BIGNUM *a, const BIGNUM *a1,
  250.                      const BIGNUM *a1_odd, int k, BN_CTX *ctx,
  251.                      BN_MONT_CTX *mont)

crypto/bn/bn_prime.c:253:10: Call
  251.                      BN_MONT_CTX *mont)
  252.   {
  253.       if (!BN_mod_exp_mont(w, w, a1_odd, a, ctx, mont)) /* w := w^a1_odd mod a */
                  ^
  254.           return -1;
  255.       if (BN_is_one(w))

crypto/bn/bn_exp.c:294:1: Parameter `m->top`
    292.   }
    293.   
    294. > int BN_mod_exp_mont(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
    295.                       const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont)
    296.   {

crypto/bn/bn_exp.c:306:16: Call
    304.   
    305.       if (BN_get_flags(p, BN_FLG_CONSTTIME) != 0) {
    306.           return BN_mod_exp_mont_consttime(rr, a, p, m, ctx, in_mont);
                          ^
    307.       }
    308.   

crypto/bn/bn_exp.c:594:1: Parameter `m->top`
      592.    * http://www.daemonology.net/hyperthreading-considered-harmful/)
      593.    */
      594. > int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
      595.                                 const BIGNUM *m, BN_CTX *ctx,
      596.                                 BN_MONT_CTX *in_mont)

crypto/bn/bn_exp.c:615:10: Call
      613.       bn_check_top(m);
      614.   
      615.       if (!BN_is_odd(m)) {
                      ^
      616.           BNerr(BN_F_BN_MOD_EXP_MONT_CONSTTIME, BN_R_CALLED_WITH_EVEN_MODULUS);
      617.           return (0);

crypto/bn/bn_lib.c:867:1: Parameter `a->top`
        865.   }
        866.   
        867. > int BN_is_odd(const BIGNUM *a)
        868.   {
        869.       return (a->top > 0) && (a->d[0] & 1);

crypto/bn/bn_exp.c:645:14: Call
      643.           if ((mont = BN_MONT_CTX_new()) == NULL)
      644.               goto err;
      645.           if (!BN_MONT_CTX_set(mont, m, ctx))
                          ^
      646.               goto err;
      647.       }

crypto/bn/bn_mont.c:247:1: Parameter `mod->top`
        245.   }
        246.   
        247. > int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx)
        248.   {
        249.       int ret = 0;

crypto/bn/bn_mont.c:252:9: Call
        250.       BIGNUM *Ri, *R;
        251.   
        252.       if (BN_is_zero(mod))
                       ^
        253.           return 0;
        254.   

crypto/bn/bn_lib.c:852:1: Parameter `a->top`
          850.   }
          851.   
          852. > int BN_is_zero(const BIGNUM *a)
          853.   {
          854.       return a->top == 0;

crypto/bn/bn_mont.c:259:10: Call
        257.           goto err;
        258.       R = &(mont->RR);            /* grab RR as a temp */
        259.       if (!BN_copy(&(mont->N), mod))
                        ^
        260.           goto err;               /* Set N */
        261.       mont->N.neg = 0;

crypto/bn/bn_lib.c:323:1: <Offset trace>
321.   }
322.   
323. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
324.   {
325.       bn_check_top(b);

crypto/bn/bn_lib.c:323:1: Parameter `b->top`
          321.   }
          322.   
          323. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
          324.   {
          325.       bn_check_top(b);

crypto/bn/bn_lib.c:323:1: <Length trace>
321.   }
322.   
323. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
324.   {
325.       bn_check_top(b);

crypto/bn/bn_lib.c:323:1: Parameter `*a->d`
          321.   }
          322.   
          323. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
          324.   {
          325.       bn_check_top(b);

crypto/bn/bn_lib.c:329:9: Call
          327.       if (a == b)
          328.           return a;
          329.       if (bn_wexpand(a, b->top) == NULL)
                         ^
          330.           return NULL;
          331.   

crypto/bn/bn_lib.c:948:1: Parameter `*a->d`
            946.   }
            947.   
            948. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
            949.   {
            950.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:333:9: Array access: Offset added: [8, +oo] Size: [0, 67108856] by call to `witness` 
          331.   
          332.       if (b->top > 0)
          333.           memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);
                         ^
          334.   
          335.       a->top = b->top;
