[v2] sprof: check pread size and offset for overflow

DJ Delorie dj@redhat.com
Fri Oct 17 00:39:23 GMT 2025


Collin Funk <collin.funk1@gmail.com> writes:
> Generally, I prefer to avoid writing overflow checks manually since it

Checking for overflow is NOT one of the things I'm worried about.  It's
not one of the things I'm expecting or checking for.

I'm checking that all the values are in the range [0..filesize].

Using an overflow check as some sort of subtle way of checking for
something else, is not good practice IMHO.



More information about the Libc-alpha mailing list