crypto/ec/ec_mult.c:278: error: BUFFER_OVERRUN_S2
  Offset: `num` Size: [0, +oo].
Showing all 9 steps of the trace


crypto/ec/ec_mult.c:125:1: <Offset trace>
123.    * in the addition if scalar != NULL
124.    */
125. > int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
126.                   size_t num, const EC_POINT *points[], const BIGNUM *scalars[],
127.                   BN_CTX *ctx)

crypto/ec/ec_mult.c:125:1: Parameter `num`
123.    * in the addition if scalar != NULL
124.    */
125. > int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
126.                   size_t num, const EC_POINT *points[], const BIGNUM *scalars[],
127.                   BN_CTX *ctx)

crypto/ec/ec_mult.c:125:1: <Length trace>
123.    * in the addition if scalar != NULL
124.    */
125. > int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
126.                   size_t num, const EC_POINT *points[], const BIGNUM *scalars[],
127.                   BN_CTX *ctx)

crypto/ec/ec_mult.c:125:1: Parameter `num`
123.    * in the addition if scalar != NULL
124.    */
125. > int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
126.                   size_t num, const EC_POINT *points[], const BIGNUM *scalars[],
127.                   BN_CTX *ctx)

crypto/ec/ec_mult.c:219:5: Assignment
217.       }
218.   
219.       totalnum = num + numblocks;
           ^
220.   
221.       wsize = OPENSSL_malloc(totalnum * sizeof wsize[0]);

crypto/ec/ec_mult.c:221:13: Call
219.       totalnum = num + numblocks;
220.   
221.       wsize = OPENSSL_malloc(totalnum * sizeof wsize[0]);
                   ^
222.       wNAF_len = OPENSSL_malloc(totalnum * sizeof wNAF_len[0]);
223.       wNAF = OPENSSL_malloc((totalnum + 1) * sizeof wNAF[0]); /* includes space

crypto/mem.c:165:9: Assignment
  163.   
  164.       if (num <= 0)
  165.           return NULL;
                 ^
  166.   
  167.       FAILTEST();

crypto/ec/ec_mult.c:221:5: Assignment
219.       totalnum = num + numblocks;
220.   
221.       wsize = OPENSSL_malloc(totalnum * sizeof wsize[0]);
           ^
222.       wNAF_len = OPENSSL_malloc(totalnum * sizeof wNAF_len[0]);
223.       wNAF = OPENSSL_malloc((totalnum + 1) * sizeof wNAF[0]); /* includes space

crypto/ec/ec_mult.c:278:13: Array access: Offset: num Size: [0, +oo]
276.                * use the window size for which we have precomputation
277.                */
278.               wsize[num] = pre_comp->w;
                   ^
279.               tmp_wNAF = bn_compute_wNAF(scalar, wsize[num], &tmp_len);
280.               if (!tmp_wNAF)
