crypto/ec/ec_lib.c:1043: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_sub`.
Showing all 18 steps of the trace


crypto/ec/ec_lib.c:1034:14: Call
1032.   
1033.       BN_CTX_start(ctx);
1034.       if ((e = BN_CTX_get(ctx)) == NULL)
                     ^
1035.           goto err;
1036.   

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/ec/ec_lib.c:1043:10: Call
1041.       if (!BN_set_word(e, 2))
1042.           goto err;
1043.       if (!BN_sub(e, group->order, e))
                 ^
1044.           goto err;
1045.       /*-

crypto/bn/bn_add.c:45:1: Parameter `*r->d`
  43.   
  44.   /* signed sub of b from a. */
  45. > int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
  46.   {
  47.       int ret, r_neg, cmp_res;

crypto/bn/bn_add.c:59:19: Call
  57.           if (cmp_res > 0) {
  58.               r_neg = a->neg;
  59.               ret = BN_usub(r, a, b);
                          ^
  60.           } else if (cmp_res < 0) {
  61.               r_neg = !b->neg;

crypto/bn/bn_add.c:125:1: Parameter `*r->d`
    123.   
    124.   /* unsigned subtraction of b from a, a must be larger than b. */
    125. > int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b)
    126.   {
    127.       int max, min, dif;

crypto/bn/bn_add.c:143:9: Call
    141.       }
    142.   
    143.       if (bn_wexpand(r, max) == NULL)
                   ^
    144.           return 0;
    145.   

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_sub` 
          231.       assert(b->top <= words);
          232.       if (b->top > 0)
          233.           memcpy(a, b->d, sizeof(*a) * b->top);
                         ^
          234.   
          235.       return a;
