Subject: bug#13530: head: memory exhausted when printing all from stdin but last P/E bytes

From: Paul Eggert <[email-masked]>
Date: Mon, 27 May 2013 17:25:36 -0700

On 05/27/2013 05:07 PM, Jim Meyering wrote:

> +max_BUFSIZ=$(expr 256 '*' 1024)
> +lim=$(expr $SIZE_MAX - $max_BUFSIZ)

Can't this code fail, due to overflow, on non-GMP hosts?  See:

http://lists.gnu.org/archive/html/coreutils/2013-05/msg00060.html

and look for "$SIZE_MAX".