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


crypto/bn/bn_exp.c:737:14: Assignment
735.           /* 2^(top*BN_BITS2) - m */
736.           tmp.d[0] = (0 - m->d[0]) & BN_MASK2;
737.           for (i = 1; i < top; i++)
                    ^
738.               tmp.d[i] = (~m->d[i]) & BN_MASK2;
739.           tmp.top = top;

crypto/bn/bn_exp.c:1036:14: Call
1034.           for (wvalue = 0, i = bits % window; i >= 0; i--, bits--)
1035.               wvalue = (wvalue << 1) + BN_is_bit_set(p, bits);
1036.           if (!MOD_EXP_CTIME_COPY_FROM_PREBUF(&tmp, top, powerbuf, wvalue,
                     ^
1037.                                               window))
1038.               goto err;

crypto/bn/bn_exp.c:518:1: Parameter `top`
  516.   }
  517.   
  518. > static int MOD_EXP_CTIME_COPY_FROM_PREBUF(BIGNUM *b, int top,
  519.                                             unsigned char *buf, int idx,
  520.                                             int window)

crypto/bn/bn_exp.c:575:5: Assignment
  573.       }
  574.   
  575.       b->top = top;
             ^
  576.       bn_correct_top(b);
  577.       return 1;

crypto/bn/bn_exp.c:576:5: Call
  574.   
  575.       b->top = top;
  576.       bn_correct_top(b);
             ^
  577.       return 1;
  578.   }

crypto/bn/bn_lib.c:953:1: Parameter `a->top`
    951.   }
    952.   
    953. > void bn_correct_top(BIGNUM *a)
    954.   {
    955.       BN_ULONG *ftl;

crypto/bn/bn_exp.c:1077:10: Call
1075.       } else
1076.   #endif
1077.       if (!BN_from_montgomery(rr, &tmp, mont, ctx))
                 ^
1078.           goto err;
1079.       ret = 1;

crypto/bn/bn_mont.c:166:1: Parameter `a->top`
  164.   #endif                          /* MONT_WORD */
  165.   
  166. > int BN_from_montgomery(BIGNUM *ret, const BIGNUM *a, BN_MONT_CTX *mont,
  167.                          BN_CTX *ctx)
  168.   {

crypto/bn/bn_mont.c:174:34: Call
  172.   
  173.       BN_CTX_start(ctx);
  174.       if ((t = BN_CTX_get(ctx)) && BN_copy(t, a))
                                          ^
  175.           retn = BN_from_montgomery_word(ret, t, mont);
  176.       BN_CTX_end(ctx);

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, 536870848] by call to `BN_from_montgomery` 
    331.   
    332.       if (b->top > 0)
    333.           memcpy(a->d, b->d, sizeof(b->d[0]) * b->top);
                   ^
    334.   
    335.       a->top = b->top;
