[Expat-checkins] expat/lib xmlparse.c,1.39,1.40

fdrake@users.sourceforge.net fdrake@users.sourceforge.net
Thu May 23 11:38:03 2002


Update of /cvsroot/expat/expat/lib
In directory usw-pr-cvs1:/tmp/cvs-serv22368/lib

Modified Files:
	xmlparse.c 
Log Message:
In the "DTD scaffold", keep the count of elements allocated in sync with the
number of elements.

Index: xmlparse.c
===================================================================
RCS file: /cvsroot/expat/expat/lib/xmlparse.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- xmlparse.c	22 May 2002 04:27:06 -0000	1.39
+++ xmlparse.c	23 May 2002 18:37:03 -0000	1.40
@@ -4944,7 +4944,10 @@
       dtd.scaffSize *= 2;
     }
     else {
-      temp = MALLOC(dtd.scaffSize * sizeof(CONTENT_SCAFFOLD));
+      /* 32 is the new value of dtd.scaffSize;
+         these two occurances must be kept in sync:
+      */
+      temp = MALLOC(32 * sizeof(CONTENT_SCAFFOLD));
       if (temp == NULL)
         return -1;
       dtd.scaffSize = 32;