pspp-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pspp-cvs] pspp/src/output ChangeLog table.c


From: Ben Pfaff
Subject: [Pspp-cvs] pspp/src/output ChangeLog table.c
Date: Sun, 02 Jul 2006 05:44:25 +0000

CVSROOT:        /cvsroot/pspp
Module name:    pspp
Changes by:     Ben Pfaff <blp> 06/07/02 05:44:25

Modified files:
        src/output     : ChangeLog table.c 

Log message:
        Fix bug #16644: Output Driver crashes in DISPLAY VARIABLES.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/src/output/ChangeLog?cvsroot=pspp&r1=1.11&r2=1.12
http://cvs.savannah.gnu.org/viewcvs/pspp/src/output/table.c?cvsroot=pspp&r1=1.8&r2=1.9

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/pspp/pspp/src/output/ChangeLog,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- ChangeLog   9 Jun 2006 22:51:24 -0000       1.11
+++ ChangeLog   2 Jul 2006 05:44:25 -0000       1.12
@@ -1,3 +1,11 @@
+Sat Jul  1 22:41:26 2006  Ben Pfaff  <address@hidden>
+
+       Fix bug #16644: Output Driver crashes in DISPLAY VARIABLES.
+       
+       * table.c (tab_create): Don't allocate t->hrh, t->wrv yet, because
+       the table size might change before we're ready to use them.
+       (tabi_table) Allocate them here instead.
+
 Fri Jun  9 14:42:35 2006  Ben Pfaff  <address@hidden>
 
        Reform string library.

Index: table.c
===================================================================
RCS file: /cvsroot/pspp/pspp/src/output/table.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- table.c     9 Jun 2006 22:51:24 -0000       1.8
+++ table.c     2 Jul 2006 05:44:25 -0000       1.9
@@ -71,15 +71,9 @@
   t->rh = pool_nmalloc (t->container, nc, nr + 1);
   memset (t->rh, 0, nc * (nr + 1));
 
-  t->hrh = pool_nmalloc (t->container, nr + 1, sizeof *t->hrh);
-  memset (t->hrh, 0, sizeof *t->hrh * (nr + 1));
-
   t->rv = pool_nmalloc (t->container, nr, nc + 1);
   memset (t->rv, UCHAR_MAX, nr * (nc + 1));
 
-  t->wrv = pool_nmalloc (t->container, nc + 1, sizeof *t->wrv);
-  memset (t->wrv, 0, sizeof *t->wrv * (nc + 1));
-
   t->dim = NULL;
   t->w = t->h = NULL;
   t->col_ofs = t->row_ofs = 0;
@@ -857,6 +851,8 @@
   assert (t->w == NULL && t->h == NULL);
   t->w = pool_nalloc (t->container, t->nc, sizeof *t->w);
   t->h = pool_nalloc (t->container, t->nr, sizeof *t->h);
+  t->hrh = pool_nmalloc (t->container, t->nr + 1, sizeof *t->hrh);
+  t->wrv = pool_nmalloc (t->container, t->nc + 1, sizeof *t->wrv);
 }
 
 /* Returns the line style to use for spacing purposes for a rule




reply via email to

[Prev in Thread] Current Thread [Next in Thread]