This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/2] Replace check_mul_overflow_size_t with INT_MULTIPLY_WRAPV
- From: DJ Delorie <dj at redhat dot com>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 21 Dec 2018 21:46:16 -0500
- Subject: Re: [PATCH 1/2] Replace check_mul_overflow_size_t with INT_MULTIPLY_WRAPV
Adhemerval Zanella <adhemerval.zanella@linaro.org> writes:
> size_t size;
> - bool overflow = check_mul_overflow_size_t (element_size, count, &size);
> + bool overflow = INT_MULTIPLY_WRAPV (element_size, count, &size);
The docs for INT_MULTIPLY_WRAPV says the result type must be signed, but
size_t is NOT signed (throughout).