On Fri, Aug 19, 2016 at 12:15 PM, Eric Biggers wrote:
> check_bogus_address() checked for pointer overflow using this expression,
> where 'ptr' has type 'const void *':
>
> ptr + n < ptr
>
> Since pointer wraparound is undefined behavior, gcc at -O2 by default
>
On Fri, Aug 19, 2016 at 12:15 PM, Eric Biggers wrote:
> check_bogus_address() checked for pointer overflow using this expression,
> where 'ptr' has type 'const void *':
>
> ptr + n < ptr
>
> Since pointer wraparound is undefined behavior, gcc at -O2 by default
> treats it like the
check_bogus_address() checked for pointer overflow using this expression,
where 'ptr' has type 'const void *':
ptr + n < ptr
Since pointer wraparound is undefined behavior, gcc at -O2 by default
treats it like the following, which would not behave as intended:
(long)n < 0
check_bogus_address() checked for pointer overflow using this expression,
where 'ptr' has type 'const void *':
ptr + n < ptr
Since pointer wraparound is undefined behavior, gcc at -O2 by default
treats it like the following, which would not behave as intended:
(long)n < 0
4 matches
Mail list logo