[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [coreutils] [PATCH] sort: fix bug with EOF at buffer refill
From: |
Pádraig Brady |
Subject: |
Re: [coreutils] [PATCH] sort: fix bug with EOF at buffer refill |
Date: |
Tue, 27 Jul 2010 12:04:41 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 |
On 27/07/10 04:53, Paul Eggert wrote:
> * src/sort.c (fillbuf): Don't append eol unless the line is nonempty.
> This fixes a bug that was partly but not completely fixed by
> the aadc67dfdb47f28bb8d1fa5e0fe0f52e2a8c51bf commit (dated July 15).
> * tests/misc/sort (realloc-buf-2): New test, which catches this
> bug on 64-bit hosts.
Good catch. The extra blank line is output on
my 32 bit system with: printf "%*s\n" 40 | sort -S1
Note even thought the *ptrlim++ = eol; line was
restored as it was originally, the extraneous line is
only output since Chen's patch.
cheers,
Pádraig.