crypto/ec/ecp_oct.c:101: error: BUFFER_OVERRUN_L3
  Offset: [1, +oo] Size: [0, 8388607] by call to `BN_mod_sqrt`.
Showing all 24 steps of the trace


crypto/ec/ecp_oct.c:62:14: Call
60.           if (!BN_mod_sqr(tmp2, x_, group->field, ctx))
61.               goto err;
62.           if (!BN_mod_mul(tmp1, tmp2, x_, group->field, ctx))
                   ^
63.               goto err;
64.       }

crypto/bn/bn_mod.c:193:1: Parameter `r->top`
  191.   
  192.   /* slow but works */
  193. > int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
  194.                  BN_CTX *ctx)
  195.   {

crypto/ec/ecp_oct.c:101:10: Call
99.       }
100.   
101.       if (!BN_mod_sqrt(y, tmp1, group->field, ctx)) {
                ^
102.           unsigned long err = ERR_peek_last_error();
103.   

crypto/bn/bn_sqrt.c:13:1: Parameter `a->top`
  11.   #include "bn_lcl.h"
  12.   
  13. > BIGNUM *BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
  14.   /*
  15.    * Returns 'ret' such that ret^2 == a (mod p), using the Tonelli/Shanks

crypto/bn/bn_sqrt.c:45:9: Call
  43.       }
  44.   
  45.       if (BN_is_zero(a) || BN_is_one(a)) {
                ^
  46.           if (ret == NULL)
  47.               ret = BN_new();

crypto/bn/bn_lib.c:843:1: Parameter `a->top`
    841.   }
    842.   
    843. > int BN_is_zero(const BIGNUM *a)
    844.   {
    845.       return a->top == 0;

crypto/bn/bn_sqrt.c:45:26: Call
  43.       }
  44.   
  45.       if (BN_is_zero(a) || BN_is_one(a)) {
                                 ^
  46.           if (ret == NULL)
  47.               ret = BN_new();

crypto/bn/bn_lib.c:848:1: Parameter `a->top`
    846.   }
    847.   
    848. > int BN_is_one(const BIGNUM *a)
    849.   {
    850.       return BN_abs_is_word(a, 1) && !a->neg;

crypto/bn/bn_lib.c:850:12: Call
    848.   int BN_is_one(const BIGNUM *a)
    849.   {
    850.       return BN_abs_is_word(a, 1) && !a->neg;
                      ^
    851.   }
    852.   

crypto/bn/bn_lib.c:838:1: Parameter `a->top`
      836.   }
      837.   
      838. > int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w)
      839.   {
      840.       return ((a->top == 1) && (a->d[0] == w)) || ((w == 0) && (a->top == 0));

crypto/bn/bn_sqrt.c:75:10: Call
  73.   
  74.       /* A = a mod p */
  75.       if (!BN_nnmod(A, a, p, ctx))
                 ^
  76.           goto end;
  77.   

crypto/bn/bn_mod.c:13:1: Parameter `m->top`
    11.   #include "bn_lcl.h"
    12.   
    13. > int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx)
    14.   {
    15.       /*

crypto/bn/bn_mod.c:20:11: Call
    18.        */
    19.   
    20.       if (!(BN_mod(r, m, d, ctx)))
                    ^
    21.           return 0;
    22.       if (!r->neg)

crypto/bn/bn_div.c:188:1: Parameter `num->top`
      186.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
      187.    */
      188. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
      189.              BN_CTX *ctx)
      190.   {

crypto/bn/bn_div.c:255:11: Call
      253.       sdiv->neg = 0;
      254.       norm_shift += BN_BITS2;
      255.       if (!(BN_lshift(snum, num, norm_shift)))
                       ^
      256.           goto err;
      257.       snum->neg = 0;

crypto/bn/bn_shift.c:83:1: <Offset trace>
81.   }
82.   
83. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
84.   {
85.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:83:1: Parameter `n`
        81.   }
        82.   
        83. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
        84.   {
        85.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:97:5: Assignment
        95.       }
        96.   
        97.       nw = n / BN_BITS2;
                   ^
        98.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
        99.           return 0;

crypto/bn/bn_shift.c:83:1: <Length trace>
81.   }
82.   
83. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
84.   {
85.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:83:1: Parameter `*r->d`
        81.   }
        82.   
        83. > int BN_lshift(BIGNUM *r, const BIGNUM *a, int n)
        84.   {
        85.       int i, nw, lb, rb;

crypto/bn/bn_shift.c:98:9: Call
        96.   
        97.       nw = n / BN_BITS2;
        98.       if (bn_wexpand(r, a->top + nw + 1) == NULL)
                       ^
        99.           return 0;
        100.       r->neg = a->neg;

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

crypto/bn/bn_shift.c:104:5: Assignment
        102.       rb = BN_BITS2 - lb;
        103.       f = a->d;
        104.       t = r->d;
                   ^
        105.       t[a->top + nw] = 0;
        106.       if (lb == 0)

crypto/bn/bn_shift.c:112:13: Array access: Offset: [1, +oo] Size: [0, 8388607] by call to `BN_mod_sqrt` 
        110.           for (i = a->top - 1; i >= 0; i--) {
        111.               l = f[i];
        112.               t[nw + i + 1] |= (l >> rb) & BN_MASK2;
                           ^
        113.               t[nw + i] = (l << lb) & BN_MASK2;
        114.           }
