GNU bug report logs - #50611
one-byte (write) heap-buffer-underrun

Previous Next

Package: coreutils;

Reported by: Jim Meyering <jim <at> meyering.net>

Date: Thu, 16 Sep 2021 00:30:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 50611 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: 50611 <at> debbugs.gnu.org
Subject: Re: bug#50611: one-byte (write) heap-buffer-underrun
Date: Thu, 16 Sep 2021 20:43:00 +0100
On 16/09/2021 19:51, Paul Eggert wrote:
> On 9/16/21 4:34 AM, Pádraig Brady wrote:
>> It got me thinking though, that we should not we warning/failing on
>> blank lines.
>> I.e., we should be treating blank lines like comments.
>> The attached does that.
> 
> Thaks, a good improvement. The nerd in me also suggests changing this:
> 
>         line[line_length] = '\0';
> 
>         /* Ignore blank lines.  */
>         if (line_length == 0)
>           continue;
> 
> to this:
> 
>         /* Ignore empty lines.  */
>         if (line_length == 0)
>           continue;
> 
>         line[line_length] = '\0';

Pushed with that adjustment.

cheers,
Pádraig




This bug report was last modified 3 years and 246 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.