Luke Small <lukensm...@gmail.com> wrote:

> I guess I always thought there'd be some more substantial overflow mitigation.

You have to free with the exact same size as allocation.

nmemb and size did not change.

The math has already been checked, and regular codeflows will store the
multiple in a single variable after successful checking&allocation, for
reuse.

> Would it be too much hand-holding to put in the manpage that to avoid 
> potential
> freeezero() integer overflow,
> it may be useful to run freezero() as freezero((size_t)nmemb * (size_t)size);

Wow, Those casts make it very clear you don't understand C, if you do
that kind of stuff elsewhere you are introducing problems.

Sorry no you are wrong.

Reply via email to