Commit Graph

4 Commits

Author SHA1 Message Date
Nicolas Iooss 572c617c91 fc_sort: initialize allocated memory to fix execution on an empty file
When running fc_sort on an empty context file, this program uses uninitialized
pointers when accessing to the elements of a list.  On my system, it goes in a
very long loop (maybe infinite) because uninitialized fields in malloc'ed
structures happen to contain valid pointers in the heap.

This patch fixes this bug by initializing ->next and ->data fields before they
may be read.
2014-04-04 15:47:36 -04:00
Nicolas Iooss eedc944a54 fc_sort: fix typos in comments 2014-04-04 15:47:36 -04:00
Chris PeBenito c87f945a5a Fix fc_sort.c warning uncovered by recent gcc
output_name in main was set to argv[2] but then argv[2] rather than
output_name was used later in the function.
2013-02-26 09:16:49 -05:00
Chris PeBenito 17de1b790b remove extra level of directory 2006-07-12 20:32:27 +00:00