On Wed, Apr 29, 2015 at 3:24 PM, David CARLIER <[email protected]> wrote: > There it is a tiny diff about ed ... > > 1/ using a long long (for 32 bits case) for strtol.
Since strtol() returns a long, how can this have any effect? > 2/ realloc => reallocarray > > Hope it has any use.... The point of reallocarray() is that it checks the multiple for overflow; since sizeof(char) == 1, that check can never fail. If the concern is overflow of 'ti', the check needs to be done locally, before the addition. As for freeing 'b' on failure, doing so without resetting 'n' to zero will result in a NULL dereference the next time the involved function is hit. Sorry, but this seems all wrong... Philip Guenther
