crypto/bn/bn_mont.c:75: 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:67:14: Call
65.       bn_check_top(tmp);
66.       if (a == b) {
67.           if (!bn_sqr_fixed_top(tmp, a, ctx))
                   ^
68.               goto err;
69.       } else {

crypto/bn/bn_sqr.c:27:1: Parameter `r->top`
  25.   }
  26.   
  27. > int bn_sqr_fixed_top(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx)
  28.   {
  29.       int max, al;

crypto/bn/bn_mont.c:75:10: Call
73.       /* reduce from aRR to aR */
74.   #ifdef MONT_WORD
75.       if (!bn_from_montgomery_word(r, tmp, mont))
               ^
76.           goto err;
77.   #else

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:103:9: Call
  101.   
  102.       max = (2 * nl);             /* carry is stored separately */
  103.       if (bn_wexpand(r, max) == NULL)
                 ^
  104.           return 0;
  105.   

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:950:37: Call
    948.   BIGNUM *bn_wexpand(BIGNUM *a, int words)
    949.   {
    950.       return (words <= a->dmax) ? a : bn_expand2(a, words);
                                               ^
    951.   }
    952.   

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;
