changeset 1180:cc6df5de72a6 trunk

[svn] - fix invalid write of size 4 (actuators.c:56)
author nenolod
date Sat, 09 Jun 2007 06:10:17 -0700
parents f121f2b1711a
children 2f3397e53b05
files ChangeLog src/paranormal/actuators.c
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Jun 08 15:02:31 2007 -0700
+++ b/ChangeLog	Sat Jun 09 06:10:17 2007 -0700
@@ -1,3 +1,11 @@
+2007-06-08 22:02:31 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [2552]
+  - use g_random_double_ranged()
+  
+  trunk/src/paranormal/libcalc/function.c |    2 +-
+  1 file changed, 1 insertion(+), 1 deletion(-)
+
+
 2007-06-08 21:24:30 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [2550]
   - possible crash fixes wrt global regs
--- a/src/paranormal/actuators.c	Fri Jun 08 15:02:31 2007 -0700
+++ b/src/paranormal/actuators.c	Sat Jun 09 06:10:17 2007 -0700
@@ -27,7 +27,7 @@
       /* count the options */
       for (i=0; actuator->desc->option_descs[i].name; i++);
 
-      actuator->options = g_new (struct pn_actuator_option, i);
+      actuator->options = g_new (struct pn_actuator_option, i + 1);
       for (i=0; actuator->desc->option_descs[i].name; i++)
 	{
 	  actuator->options[i].desc = &actuator->desc->option_descs[i];