]> granicus.if.org Git - libexpat/commitdiff
Revised fix for abort occurring with a percent followed by whitespace or
authorClark Cooper <coopercc@users.sourceforge.net>
Fri, 20 Oct 2000 15:14:36 +0000 (15:14 +0000)
committerClark Cooper <coopercc@users.sourceforge.net>
Fri, 20 Oct 2000 15:14:36 +0000 (15:14 +0000)
another percent in entity values.

expat/Changes
expat/configure.in
expat/lib/xmlparse.c
expat/lib/xmltok_impl.c

index e32e2989a3a884ea30592a8c90161b228ba36cb6..d957edaa396ea8c15694fd1fbcdc74e58ef6447d 100644 (file)
@@ -1,3 +1,5 @@
+       - Fixed a bug where parameter entities weren't being expanded inside
+         entity literals.
        - Defined XML_SetEndNamespaceDeclHandler. Thanks to Darryl Miles for
          finding this oversight.
        - Changed default patterns in lib/Makefile.in to fit non-GNU makes
index b37cde598c33bcddd651d18243a4c48bcde16dcc..5b3e29a8d5dc3af4a2fbb6bf167bf531750430a1 100644 (file)
@@ -22,7 +22,7 @@ dnl
 
 EXPAT_MAJOR_VERSION=1
 EXPAT_MINOR_VERSION=95
-EXPAT_EDIT=0
+EXPAT_EDIT=1
 
 EXPAT_VERSION=$EXPAT_MAJOR_VERSION.$EXPAT_MINOR_VERSION.$EXPAT_EDIT
 VERSION=$EXPAT_VERSION
@@ -40,7 +40,7 @@ dnl If the API changes incompatibly set LIBAGE back to 0
 dnl
 
 LIBCURRENT=0
-LIBREVISION=0
+LIBREVISION=1
 LIBAGE=0
 
 AC_CONFIG_HEADER(config.h:config.hin)
index 56f5ab727cef9bd6e92ce721b23c40c89ace1627..96c9c41574f2bc0f08a544b8d310fcedb65268e6 100644 (file)
@@ -4,7 +4,7 @@ See the file COPYING for copying permission.
 */
 
 static char RCSId[]
-  = "$Header: /cvsroot/expat/expat/lib/xmlparse.c,v 1.7 2000/10/09 06:26:10 jclark Exp $";
+  = "$Header: /cvsroot/expat/expat/lib/xmlparse.c,v 1.8 2000/10/10 18:48:48 coopercc Exp $";
 
 #include <config.h>
 
@@ -3533,11 +3533,6 @@ enum XML_Error storeEntityValue(XML_Parser parser,
        return XML_ERROR_NO_MEMORY;
       *(pool->ptr)++ = 0xA;
       break;
-    case XML_TOK_PERCENT:
-      if (pool->end == pool->ptr && !poolGrow(pool))
-       return XML_ERROR_NO_MEMORY;
-      *(pool->ptr)++ = '%';
-      break;
     case XML_TOK_CHAR_REF:
       {
        XML_Char buf[XML_ENCODE_MAX];
index 73617f74cf8d1ca15feb4c92fb9f1d48918a7987..36d2065ce363bb6d9fa189ebc7dd53728fcaad6b 100644 (file)
@@ -1270,8 +1270,11 @@ int PREFIX(entityValueTok)(const ENCODING *enc, const char *ptr, const char *end
       *nextTokPtr = ptr;
       return XML_TOK_DATA_CHARS;
     case BT_PERCNT:
-      if (ptr == start)
-       return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
+      if (ptr == start) {
+       int tok =  PREFIX(scanPercent)(enc, ptr + MINBPC(enc),
+                                      end, nextTokPtr);
+       return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
+      }
       *nextTokPtr = ptr;
       return XML_TOK_DATA_CHARS;
     case BT_LF: