Fix up potential overflows in size calculations by replacing instances
[pspp] / src / ChangeLog
index 85dcaa8e4dc79aca85af5ad3afa7e4e4c98a574e..7e5f4057f8ed5a2b32bab4f5bd82b6da4af4ae71 100644 (file)
@@ -1,3 +1,78 @@
+Tue Oct 25 21:56:23 2005  Ben Pfaff  <blp@gnu.org>
+
+       Fix up potential overflows in size calculations by replacing
+       instances of xmalloc(x * sizeof *y) by xnmalloc(x, sizeof *y)
+       everywhere I could find them.  Similarly by xrealloc(), malloc().
+       (Order is important: xnmalloc(sizeof *y, x) will divide by 0 if x
+       is 0.)
+
+       * alloc.c: (nmalloc) New function.
+       (out_of_memory) Removed.  Replaced references by xalloc_die().
+
+       * sort.c: (allocate_cases) Fix segfault if memory allocation
+       fails.
+
+       * subclist.c: (subc_list_double_create) Use xnmalloc() instead of
+       malloc().
+       (subc_list_double_push) Use xnrealloc() instead of realloc().
+
+Wed Oct 26 08:43:51 WST 2005 John Darrington <john@darrington.wattle.id.au>
+
+       Dictionary abstraction part #2
+
+       * algorithm.c format.c str.c sysfile-info.c val.h var.h vars-atr.c:
+         Removed unnecessary #include directives
+
+Mon Oct 24 21:35:08 2005  Ben Pfaff  <blp@gnu.org>
+
+       * groff-font.c (font_msg): Use err_vmsg() instead of incorrectly
+       trying to pass a va_list to tmsg().  Thanks to Jason Stover for
+       reporting this bug.
+
+Mon Oct 24 21:24:15 2005  Ben Pfaff  <blp@gnu.org>
+
+       Work to get rid of GCC 4.0 warnings, part 2.
+
+       In many files, change `unsigned char' to `char'.  This often
+       requires adding casts to <ctype.h> functions.
+
+       * data-in.c: (parse_A) Use buf_copy_rpad().
+
+       * str.c: (str_copy_buf_trunc) New function.
+
+       * value-labels.c: (value_to_string) Fix mistaken use of strncpy(),
+       by rewriting.
+
+Mon Oct 24 13:42:32 WST 2005 John Darrington <john@darrington.wattle.id.au>
+
+       Moved some definitions to make it easier to abstract a dictionary 
+       from the rest of PSPP.
+
+       * format-prs.c lex-def.[ch]:  New files.
+
+       * Makefile.am lexer.[ch] dictionary.c vars-atr.c vfm.c algorithm.c 
+         format.c:  Moved some functions between modules.
+       
+Sun Oct 23 19:28:08 2005  Ben Pfaff  <blp@gnu.org>
+
+       Work to get rid of GCC 4.0 warnings, part 1.
+       
+       In many files, change count parameters to parse_variables(),
+       etc. from `int' to `size_t'.  Also change related variables and
+       struct members.  Also change messages as needed (e.g. %d to %u
+       with cast to unsigned).  Also change arithmetic as necessary
+       (e.g. n >= m - 1 to n + 1 >= m). 
+
+       * crosstabs.q: (crs_custom_tables) Check for size_t overflow in
+       multiplication.
+
+       * q2c.c: (dump_declarations) Generate code for size_t instead of
+       int.
+       
+Thu Oct 20 18:18:40 2005  Ben Pfaff  <blp@gnu.org>
+
+       * output.c: (outp_read_devices) Fix message.
+
 Sat Sep 17 11:13:13 2005  Ben Pfaff  <blp@gnu.org>
 
        * matrix-data.c: (cmd_matrix_data) Change type of variable whose