]> git.ipfire.org Git - thirdparty/coreutils.git/commit
sort: don't dump core when merging from input twice
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 Dec 2010 08:03:29 +0000 (00:03 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 Dec 2010 08:04:32 +0000 (00:04 -0800)
commitf3c584d1e08646704cb46f4e5b6afc4afef3f70a
tree7a15e6158943421dca1153c3018d7aa6fdd21c1e
parent33a5de5a0efd73abbb532dbd09f5afd23c511484
sort: don't dump core when merging from input twice

* NEWS: Document this.
* src/sort.c (avoid_trashing_input): The previous fix to this
function didn't fix all the problems with this code.  Replace it
with something simpler: just copy the input file.  This doesn't
change the number of files, so return void instead of the updated
file count.  Caller changed.
* tests/misc/sort-merge-fdlimit: Test for the bug.
NEWS
src/sort.c
tests/misc/sort-merge-fdlimit