bug-coreutils
[Top][All Lists]
Advanced

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

bug#9780: sort -u throws out non-duplicates


From: Paul Eggert
Subject: bug#9780: sort -u throws out non-duplicates
Date: Fri, 17 Aug 2012 13:01:48 -0700
User-agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0

On 08/17/2012 12:53 PM, Jim Meyering wrote:
> safe_text is initially NULL and we enter that block
> only when we're about to fread into a buffer that overlaps
> the current saved_line.text buffer.

Sorry, I wasn't clear enough.  I was worried about the
case when saved_line.text does not overlap the buffer
we're about to read into, because the buffer we're about
to read into has been realloc'ed.  The idea is that we
saved a line, then realloc'ed the buffer, and now we're
doing the overlap test.  There won't be an overlap (assuming
realloc gave us fresh space), but the saved line points
into freed memory.





reply via email to

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