All pastes #1622247 Raw Edit

Untitled

public text v1 · immutable
#1622247 ·published 2009-10-15 15:36 UTC
rendered paste body
diff -urN libxml2/entities.c /tmp/libxml2-2.7.3.dfsg/entities.c
--- libxml2/entities.c  2009-10-15 16:23:59.309146427 +0200
+++ /tmp/libxml2-2.7.3.dfsg/entities.c  2009-10-15 15:48:02.000000000 +0200
@@ -102,7 +102,7 @@
         dict = entity->doc->dict;
 
 
-    if ((entity->children) && (entity->owner == 1) &&
+    if ((entity->children) && (entity->owner != 0) &&
         (entity == (xmlEntityPtr) entity->children->parent))
         xmlFreeNodeList(entity->children);
     if (dict != NULL) {
diff -urN libxml2/error.c /tmp/libxml2-2.7.3.dfsg/error.c
--- libxml2/error.c     2009-10-15 16:23:59.309146427 +0200
+++ /tmp/libxml2-2.7.3.dfsg/error.c     2009-10-15 15:48:02.000000000 +0200
@@ -45,7 +45,7 @@
        if (chars > -1)                                         \
            size += chars + 1;                                  \
        else                                                    \
-           size += 100;                                        \
+           break;                                              \
        if ((larger = (char *) xmlRealloc(str, size)) == NULL) {\
            break;                                              \
        }                                                       \
@@ -600,7 +600,7 @@
            channel = ctxt->sax->error;
        data = ctxt->userData;
     } else if (channel == NULL) {
-        if (xmlStructuredError != NULL)
+        if ((schannel == NULL) && (xmlStructuredError != NULL))
            schannel = xmlStructuredError;
        else
            channel = xmlGenericError;

diff -urN libxml2/libxml.h /tmp/libxml2-2.7.3.dfsg/libxml.h
--- libxml2/libxml.h    2009-10-15 14:43:14.356646464 +0200
+++ /tmp/libxml2-2.7.3.dfsg/libxml.h    2009-10-15 15:48:02.000000000 +0200
@@ -13,6 +13,9 @@
 #ifndef _LARGEFILE_SOURCE
 #define _LARGEFILE_SOURCE
 #endif
+#ifndef _LARGEFILE64_SOURCE
+#define _LARGEFILE64_SOURCE
+#endif
 #ifndef _FILE_OFFSET_BITS
 #define _FILE_OFFSET_BITS 64
 #endif

diff -urN libxml2/parser.c /tmp/libxml2-2.7.3.dfsg/parser.c
--- libxml2/parser.c    2009-10-15 16:23:59.317147444 +0200
+++ /tmp/libxml2-2.7.3.dfsg/parser.c    2009-10-15 15:48:02.000000000 +0200
@@ -2917,12 +2917,6 @@
  *     Routines to parse Name, NCName and NmToken                      *
  *                                                                     *
  ************************************************************************/
-unsigned long nbParseName = 0;
-unsigned long nbParseNmToken = 0;
-unsigned long nbParseNCName = 0;
-unsigned long nbParseNCNameComplex = 0;
-unsigned long nbParseNameComplex = 0;
-unsigned long nbParseStringName = 0;
 /*
  * The two following functions are related to the change of accepted
  * characters for Name and NmToken in the Revision 5 of XML-1.0
@@ -3012,8 +3006,6 @@
     int c;
     int count = 0;
 
-    nbParseNameComplex++;
-
     /*
      * Handler for more complex cases
      */
@@ -3128,8 +3120,6 @@
 
     GROW;
 
-    nbParseName++;
-
     /*
      * Accelerator for simple ASCII names
      */
@@ -3165,8 +3155,6 @@
     int c;
     int count = 0;
 
-    nbParseNCNameComplex++;
-
     /*

     * Handler for more complex cases
      */
@@ -3211,8 +3199,6 @@
     const xmlChar *ret;
     int count = 0;
 
-    nbParseNCName++;
-
     /*
      * Accelerator for simple ASCII names
      */
@@ -3306,8 +3292,6 @@
     int len = 0, l;
     int c;
 
-    nbParseStringName++;
-
     c = CUR_SCHAR(cur, l);
     if (!xmlIsNameStartChar(ctxt, c)) {
        return(NULL);
@@ -3380,8 +3364,6 @@
     int c;
     int count = 0;

-    nbParseNmToken++;
-
     GROW;
     c = CUR_CHAR(l);