crypto/ec/ec_mult.c:364: error: BUFFER_OVERRUN_S2
  Offset: `num` + 1 Size: [1, +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:294:12: Call
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
                  ^
295.                                                                * for pivot */
296.       val_sub = OPENSSL_malloc(totalnum * sizeof val_sub[0]);

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

crypto/ec/ec_mult.c:294:5: Assignment
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
           ^
295.                                                                * for pivot */
296.       val_sub = OPENSSL_malloc(totalnum * sizeof val_sub[0]);

crypto/ec/ec_mult.c:364:17: Array access: Offset: num + 1 Size: [1, +oo]
362.                   totalnum = num + 1; /* don't use wNAF splitting */
363.                   wNAF[num] = tmp_wNAF;
364.                   wNAF[num + 1] = NULL;
                       ^
365.                   wNAF_len[num] = tmp_len;
366.                   if (tmp_len > max_len)
