On Sun, Nov 29, 2020 at 08:41:50AM +0100, Theo Buehler wrote:
> On Sun, Nov 29, 2020 at 08:02:45AM +0100, Emil Engler wrote:
> > It can overflow! Please check for the positivity and width of size_t before!
>
> What can overflow? ret is guaranteed to be non-negative before the cast.
>
> As for
On Sun, Nov 29, 2020 at 06:42:47PM +1000, Jonathan Matthew wrote:
> On Sat, Nov 28, 2020 at 11:20:30PM +0100, Theo Buehler wrote:
> > /usr/src/usr.sbin/ldapd/util.c:46:21: warning: comparison of integers of
> > different signs:
> > 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
>
On Sat, Nov 28, 2020 at 11:20:30PM +0100, Theo Buehler wrote:
> /usr/src/usr.sbin/ldapd/util.c:46:21: warning: comparison of integers of
> different signs:
> 'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
> if (ret < 0 || ret >= size)
>~~~ ^
On Sun, Nov 29, 2020 at 08:02:45AM +0100, Emil Engler wrote:
> It can overflow! Please check for the positivity and width of size_t before!
What can overflow? ret is guaranteed to be non-negative before the cast.
As for the width (which would be about truncation, not overflow): while
the
It can overflow! Please check for the positivity and width of size_t before!
Cheers,
Emil
On 11/28/20 11:20 PM, Theo Buehler wrote:
/usr/src/usr.sbin/ldapd/util.c:46:21: warning: comparison of integers of
different signs:
'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
/usr/src/usr.sbin/ldapd/util.c:46:21: warning: comparison of integers of
different signs:
'int' and 'size_t' (aka 'unsigned long') [-Wsign-compare]
if (ret < 0 || ret >= size)
~~~ ^
This has been around for a while. I forgot that I had this patch in my