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


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

crypto/ec/ec_mult.c:193:1: Parameter `num`
191.    * in the addition if scalar != NULL
192.    */
193. > int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
194.                   size_t num, const EC_POINT *points[], const BIGNUM *scalars[],
195.                   BN_CTX *ctx)

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

crypto/ec/ec_mult.c:193:1: Parameter `group->extra_data->next->data->numblocks`
191.    * in the addition if scalar != NULL
192.    */
193. > int ec_wNAF_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *scalar,
194.                   size_t num, const EC_POINT *points[], const BIGNUM *scalars[],
195.                   BN_CTX *ctx)

crypto/ec/ec_mult.c:290:5: Assignment
288.       }
289.   
290.       totalnum = num + numblocks;
           ^
291.   
292.       wsize = OPENSSL_malloc(totalnum * sizeof wsize[0]);

crypto/ec/ec_mult.c:292:13: Call
290.       totalnum = num + numblocks;
291.   
292.       wsize = OPENSSL_malloc(totalnum * sizeof wsize[0]);
                   ^
293.       wNAF_len = OPENSSL_malloc(totalnum * sizeof wNAF_len[0]);
294.       wNAF = OPENSSL_malloc((totalnum + 1) * sizeof wNAF[0]); /* includes space

crypto/mem.c:125:9: Assignment
  123.   
  124.       if (num <= 0)
  125.           return NULL;
                 ^
  126.   
  127.       allow_customize = 0;

crypto/ec/ec_mult.c:292:5: Assignment
290.       totalnum = num + numblocks;
291.   
292.       wsize = OPENSSL_malloc(totalnum * sizeof wsize[0]);
           ^
293.       wNAF_len = OPENSSL_malloc(totalnum * sizeof wNAF_len[0]);
294.       wNAF = OPENSSL_malloc((totalnum + 1) * sizeof wNAF[0]); /* includes space

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