bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13098: [PATCH] cut.c: Fix memory leak


From: Pádraig Brady
Subject: bug#13098: [PATCH] cut.c: Fix memory leak
Date: Sun, 09 Dec 2012 12:57:59 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 12/08/2012 08:27 PM, Jim Meyering wrote:
+# 2^31-1

+# From coreutils-8.10 through 8.20, this would make cut try to allocate
+# a 256MiB bit vector.  With a 20MB limit on VM, the following would fail.
+(ulimit -v 20000; : | cut -b2147483647- > err 2>&1) || fail=1
+
+compare /dev/null err || fail=1

Perhaps use INT_MAX from getlimits?
In either case +1

thanks,
Pádraig.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]