crypto/bn/bn_mont.c:169: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 536870848] by call to `bn_from_montgomery_word`.
Showing all 14 steps of the trace


crypto/bn/bn_mont.c:168:34: Call
166.   
167.       BN_CTX_start(ctx);
168.       if ((t = BN_CTX_get(ctx)) && BN_copy(t, a)) {
                                        ^
169.           retn = bn_from_montgomery_word(ret, t, mont);
170.           bn_correct_top(ret);

crypto/bn/bn_lib.c:281:1: Parameter `a->top`
  279.   }
  280.   
  281. > BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b)
  282.   {
  283.       bn_check_top(b);

crypto/bn/bn_mont.c:169:16: Call
167.       BN_CTX_start(ctx);
168.       if ((t = BN_CTX_get(ctx)) && BN_copy(t, a)) {
169.           retn = bn_from_montgomery_word(ret, t, mont);
                      ^
170.           bn_correct_top(ret);
171.           bn_check_top(ret);

crypto/bn/bn_mont.c:88:1: Parameter `*r->d`
  86.   
  87.   #ifdef MONT_WORD
  88. > static int bn_from_montgomery_word(BIGNUM *ret, BIGNUM *r, BN_MONT_CTX *mont)
  89.   {
  90.       BIGNUM *n;

crypto/bn/bn_mont.c:102:9: Call
  100.   
  101.       max = (2 * nl);             /* carry is stored separately */
  102.       if (bn_wexpand(r, max) == NULL)
                 ^
  103.           return 0;
  104.   

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

crypto/bn/bn_lib.c:951:37: Call
    949.   BIGNUM *bn_wexpand(BIGNUM *a, int words)
    950.   {
    951.       return (words <= a->dmax) ? a : bn_expand2(a, words);
                                               ^
    952.   }
    953.   

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

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

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

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

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

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

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