]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
* src/sort.c: Fixx size_t and alloca bugs.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 5 Nov 2004 23:02:46 +0000 (23:02 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 5 Nov 2004 23:02:46 +0000 (23:02 +0000)
ChangeLog

index 1f2a4bb54f225ed97296a8c7f50042bb77c4d399..0a13876a5773b926848d791f8b59df0d3fbd001a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,18 @@
-2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
+2004-11-05  Paul Eggert  <eggert@cs.ucla.edu>
 
        * Version 5.3.0.
 
+       * src/sort.c (inittables, sort_buffer_size, getmonth, mergefps,
+       first_same_file, merge, sort, main): Use size_t for indexes into arrays.
+       This fixes some unlikely havoc-wreaking bugs (e.g., more than INT_MAX
+       temporary files).
+       (getmonth, keycompare, compare): Rewrite to avoid need for alloca,
+       thus avoiding unchecked stack overflow in some cases.  As a side
+       effect this improve the performance of "sort -M" by a factor of 4
+       on my benchmarks.
+       
+2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
+
        * src/stty.c: Include "vasprintf.h" since we use vasprintf now.
 
        * src/Makefile.am (check-AUTHORS): Don't assume \? works in a sed