Scott Cheloha <scottchel...@gmail.com> wrote:

> Fix attached.

That looks good, but you bring up good points:

> Maybe pedantic, but should we also be checking for addition overflow?  OpenBSD
> is fine -- those additions will not overflow, as we check prior to this point
> that all block sizes are <= SSIZE_MAX.  But the standard doesn't guarantee
> that SSIZE_MAX * 2 < SIZE_MAX.  Are such considerations left to the porter?

That might be nice.  Use a local variable to identify the overflow condition
and error out. 

Reply via email to