crypto/bn/bn_prime.c:198: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_copy`.
Showing all 16 steps of the trace


crypto/bn/bn_prime.c:190:10: Call
188.       BN_CTX_start(ctx);
189.   
190.       A1 = BN_CTX_get(ctx);
                ^
191.       A3 = BN_CTX_get(ctx);
192.       A1_odd = BN_CTX_get(ctx);

crypto/bn/bn_ctx.c:229:5: Call
  227.       }
  228.       /* OK, make sure the returned bignum is "zero" */
  229.       BN_zero(ret);
             ^
  230.       ctx->used++;
  231.       CTXDBG_RET(ctx, ret);

crypto/bn/bn_lib.c:367:15: Assignment
    365.       a->neg = 0;
    366.       a->d[0] = w;
    367.       a->top = (w ? 1 : 0);
                         ^
    368.       bn_check_top(a);
    369.       return 1;

crypto/bn/bn_lib.c:367:5: Assignment
    365.       a->neg = 0;
    366.       a->d[0] = w;
    367.       a->top = (w ? 1 : 0);
               ^
    368.       bn_check_top(a);
    369.       return 1;

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

crypto/bn/bn_lib.c:285:1: Parameter `*a->d`
  283.   }
  284.   
  285. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
  286.   {
  287.       bn_check_top(b);

crypto/bn/bn_lib.c:291:9: Call
  289.       if (a == b)
  290.           return a;
  291.       if (bn_wexpand(a, b->top) == NULL)
                 ^
  292.           return NULL;
  293.   

crypto/bn/bn_lib.c:941:1: Parameter `*a->d`
    939.   }
    940.   
    941. > BIGNUM *bn_wexpand(BIGNUM *a, int words)
    942.   {
    943.       return (words <= a->dmax) ? a : bn_expand2(a, words);

crypto/bn/bn_lib.c:943:37: Call
    941.   BIGNUM *bn_wexpand(BIGNUM *a, int words)
    942.   {
    943.       return (words <= a->dmax) ? a : bn_expand2(a, words);
                                               ^
    944.   }
    945.   

crypto/bn/bn_lib.c:246:1: Parameter `*b->d`
      244.    */
      245.   
      246. > BIGNUM *bn_expand2(BIGNUM *b, int words)
      247.   {
      248.       bn_check_top(b);

crypto/bn/bn_lib.c:251:23: Call
      249.   
      250.       if (words > b->dmax) {
      251.           BN_ULONG *a = bn_expand_internal(b, words);
                                   ^
      252.           if (!a)
      253.               return NULL;

crypto/bn/bn_lib.c:208:1: <Offset trace>
206.   /* This is used by bn_expand2() */
207.   /* The caller MUST check that words > b->dmax before calling this */
208. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
209.   {
210.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:208:1: Parameter `b->top`
        206.   /* This is used by bn_expand2() */
        207.   /* The caller MUST check that words > b->dmax before calling this */
        208. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
        209.   {
        210.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:208:1: <Length trace>
206.   /* This is used by bn_expand2() */
207.   /* The caller MUST check that words > b->dmax before calling this */
208. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
209.   {
210.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:208:1: Parameter `*b->d`
        206.   /* This is used by bn_expand2() */
        207.   /* The caller MUST check that words > b->dmax before calling this */
        208. > static BN_ULONG *bn_expand_internal(const BIGNUM *b, int words)
        209.   {
        210.       BN_ULONG *a = NULL;

crypto/bn/bn_lib.c:233:9: Array access: Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_copy` 
        231.       assert(b->top <= words);
        232.       if (b->top > 0)
        233.           memcpy(a, b->d, sizeof(*a) * b->top);
                       ^
        234.   
        235.       return a;
