bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: [PATCH] sed: avoid data loss when an input line is 2^31 bytes or lon


From: Paolo Bonzini
Subject: Re: [PATCH] sed: avoid data loss when an input line is 2^31 bytes or longer
Date: Mon, 11 Jul 2011 18:37:42 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Mnenhy/0.8.3 Thunderbird/3.1.10

On 07/11/2011 05:27 PM, Jim Meyering wrote:
I was surprised to see that sed -i could nuke its input.
Even sed without -i misbehaves:

     $ perl -le 'print "v"x(2**31-1)' |sed 's/^/v/' |wc -c
     0

Here's the fix:

 From 81ce070727b225a1e23e5a48f775811c8a9e7366 Mon Sep 17 00:00:00 2001
From: Jim Meyering<address@hidden>
Date: Mon, 11 Jul 2011 17:22:26 +0200
Subject: [PATCH] avoid silent data loss when an input line is 2^31 bytes or
  longer

Thanks, applied.

Paolo



reply via email to

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