crypto/ec/ecp_nistz256.c:1252: error: BUFFER_OVERRUN_L3
  Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_nnmod`.
Showing all 20 steps of the trace


crypto/ec/ecp_nistz256.c:1249:35: Call
1247.               if ((BN_num_bits(scalar) > 256)
1248.                   || BN_is_negative(scalar)) {
1249.                   if ((tmp_scalar = BN_CTX_get(ctx)) == NULL)
                                          ^
1250.                       goto err;
1251.   

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:402:15: Assignment
    400.       a->neg = 0;
    401.       a->d[0] = w;
    402.       a->top = (w ? 1 : 0);
                         ^
    403.       bn_check_top(a);
    404.       return (1);

crypto/bn/bn_lib.c:402:5: Assignment
    400.       a->neg = 0;
    401.       a->d[0] = w;
    402.       a->top = (w ? 1 : 0);
               ^
    403.       bn_check_top(a);
    404.       return (1);

crypto/ec/ecp_nistz256.c:1252:22: Call
1250.                       goto err;
1251.   
1252.                   if (!BN_nnmod(tmp_scalar, scalar, group->order, ctx)) {
                             ^
1253.                       ECerr(EC_F_ECP_NISTZ256_POINTS_MUL, ERR_R_BN_LIB);
1254.                       goto err;

crypto/bn/bn_mod.c:13:1: Parameter `*r->d`
  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:140:1: Parameter `*rm->d`
    138.    * If 'dv' or 'rm' is NULL, the respective value is not returned.
    139.    */
    140. > int BN_div(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num, const BIGNUM *divisor,
    141.              BN_CTX *ctx)
    142.   {

crypto/bn/bn_div.c:409:9: Call
    407.            */
    408.           int neg = num->neg;
    409.           BN_rshift(rm, snum, norm_shift);
                   ^
    410.           if (!BN_is_zero(rm))
    411.               rm->neg = neg;

crypto/bn/bn_shift.c:122:1: Parameter `*r->d`
      120.   }
      121.   
      122. > int BN_rshift(BIGNUM *r, const BIGNUM *a, int n)
      123.   {
      124.       int i, j, nw, lb, rb;

crypto/bn/bn_shift.c:145:13: Call
      143.       i = (BN_num_bits(a) - n + (BN_BITS2 - 1)) / BN_BITS2;
      144.       if (r != a) {
      145.           if (bn_wexpand(r, i) == NULL)
                         ^
      146.               return (0);
      147.           r->neg = a->neg;

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:284:1: Parameter `*b->d`
          282.    */
          283.   
          284. > BIGNUM *bn_expand2(BIGNUM *b, int words)
          285.   {
          286.       bn_check_top(b);

crypto/bn/bn_lib.c:289:23: Call
          287.   
          288.       if (words > b->dmax) {
          289.           BN_ULONG *a = bn_expand_internal(b, words);
                                       ^
          290.           if (!a)
          291.               return NULL;

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

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

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

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

crypto/bn/bn_lib.c:271:9: Array access: Offset added: [8, +oo] Size: [0, 536870848] by call to `BN_nnmod` 
            269.       assert(b->top <= words);
            270.       if (b->top > 0)
            271.           memcpy(a, b->d, sizeof(*a) * b->top);
                           ^
            272.   
            273.       return a;
