bug-sed
[Top][All Lists]
Advanced

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

bug#30520: sed: silently fail substitution for 2GB+ single-line file


From: Assaf Gordon
Subject: bug#30520: sed: silently fail substitution for 2GB+ single-line file
Date: Thu, 22 Mar 2018 19:41:38 -0600
User-agent: Mutt/1.5.24 (2015-08-30)

On Thu, Mar 22, 2018 at 05:12:11PM -0700, Jim Meyering wrote:
> On Mon, Feb 19, 2018 at 12:32 PM, Assaf Gordon <address@hidden> wrote:
> > On Mon, Feb 19, 2018 at 06:51:04AM +0000, YushiOMOTE wrote:
> >> When I pass a 2GB+-single-line to sed for substitution, sed exits with
> >> success status code but it silently fails substitution.
> ...
> >> Or, we can check if the value of line length exceeds INT_MAX before
> >> reaching `re_search`. (`grep` checks it and returns with error status code)
> >
> > This is likely the simplest solution for now, without changing gnulib 
> > itself.
> 
> Thank you both. I too prefer this approach. Would you like to do that, Assaf?

Yes, attached a suggested patch.

Comments welcomed,
 - assaf

Attachment: 0001-sed-reject-RE-searches-on-buffers-larger-than-INT_MA.patch
Description: Text Data


reply via email to

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