[packages/libxml] - fix format string errors

baggins baggins at pld-linux.org
Sun Jan 4 10:41:32 CET 2015


commit 1dd6f1efaee6e3c8b921813e986917c7fec9e82d
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Jan 4 09:41:21 2015 +0000

    - fix format string errors

 format-security.patch | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++
 libxml.spec           |  2 ++
 2 files changed, 77 insertions(+)
---
diff --git a/libxml.spec b/libxml.spec
index b641a76..e81724f 100644
--- a/libxml.spec
+++ b/libxml.spec
@@ -22,6 +22,7 @@ Patch2:		%{name}-urlbound.patch
 Patch3:		%{name}-man.patch
 Patch4:		%{name}-CAN-2004-0989.patch
 Patch5:		%{name}-open.patch
+Patch6:		format-security.patch
 URL:		http://xmlsoft.org/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -121,6 +122,7 @@ libxml приложений.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 %build
 %{__libtoolize}
diff --git a/format-security.patch b/format-security.patch
new file mode 100644
index 0000000..ab5d7fd
--- /dev/null
+++ b/format-security.patch
@@ -0,0 +1,75 @@
+--- libxml-1.8.17/debugXML.c~	2000-06-28 18:33:46.000000000 +0000
++++ libxml-1.8.17/debugXML.c	2015-01-04 09:40:07.436759762 +0000
+@@ -46,7 +46,7 @@
+         shift[2 * i] = shift[2 * i + 1] = ' ';
+     shift[2 * i] = shift[2 * i + 1] = 0;
+ 
+-    fprintf(output, shift);
++    fprintf(output, "%s", shift);
+     if (ns->type == XML_GLOBAL_NAMESPACE)
+         fprintf(output, "old ");
+     if (ns->prefix != NULL)
+@@ -73,7 +73,7 @@
+         shift[2 * i] = shift[2 * i + 1] = ' ';
+     shift[2 * i] = shift[2 * i + 1] = 0;
+ 
+-    fprintf(output, shift);
++    fprintf(output, "%s", shift);
+     switch (ent->type) {
+         case XML_INTERNAL_GENERAL_ENTITY:
+ 	    fprintf(output, "INTERNAL_GENERAL_ENTITY ");
+@@ -95,15 +95,15 @@
+     }
+     fprintf(output, "%s\n", ent->name);
+     if (ent->ExternalID) {
+-        fprintf(output, shift);
++        fprintf(output, "%s", shift);
+         fprintf(output, "ExternalID=%s\n", ent->ExternalID);
+     }
+     if (ent->SystemID) {
+-        fprintf(output, shift);
++        fprintf(output, "%s", shift);
+         fprintf(output, "SystemID=%s\n", ent->SystemID);
+     }
+     if (ent->content) {
+-        fprintf(output, shift);
++        fprintf(output, "%s", shift);
+ 	fprintf(output, "content=");
+ 	xmlDebugDumpString(output, ent->content);
+ 	fprintf(output, "\n");
+@@ -118,7 +118,7 @@
+         shift[2 * i] = shift[2 * i + 1] = ' ';
+     shift[2 * i] = shift[2 * i + 1] = 0;
+ 
+-    fprintf(output, shift);
++    fprintf(output, "%s", shift);
+     fprintf(output, "ATTRIBUTE %s\n", attr->name);
+     if (attr->val != NULL) 
+         xmlDebugDumpNodeList(output, attr->val, depth + 1);
+@@ -139,7 +139,7 @@
+         shift[2 * i] = shift[2 * i + 1] = ' ';
+     shift[2 * i] = shift[2 * i + 1] = 0;
+ 
+-    fprintf(output, shift);
++    fprintf(output, "%s", shift);
+     switch (node->type) {
+ 	case XML_ELEMENT_NODE:
+ 	    fprintf(output, "ELEMENT ");
+@@ -186,7 +186,7 @@
+ 	    fprintf(output, "NODE_%d\n", node->type);
+     }
+     if (node->doc == NULL) {
+-        fprintf(output, shift);
++        fprintf(output, "%s", shift);
+ 	fprintf(output, "doc == NULL !!!\n");
+     }
+     if (node->nsDef != NULL) 
+@@ -195,7 +195,7 @@
+ 	xmlDebugDumpAttrList(output, node->properties, depth + 1);
+     if (node->type != XML_ENTITY_REF_NODE) {
+ 	if (node->content != NULL) {
+-	    fprintf(output, shift);
++	    fprintf(output, "%s", shift);
+ 	    fprintf(output, "content=");
+ #ifndef XML_USE_BUFFER_CONTENT	    
+ 	    xmlDebugDumpString(output, node->content);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libxml.git/commitdiff/1dd6f1efaee6e3c8b921813e986917c7fec9e82d



More information about the pld-cvs-commit mailing list