Browse code

Add patch to libxml2 to remove call to _PyVerify_fd

Change-Id: I1535b53c9976fde177c442194fae7ca0b2fae522
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3931
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Sharath George

suezzelur authored on 2017/10/03 07:00:28
Showing 2 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,18 @@
0
+diff -rup libxml2-2.9.4/python/types.c libxml2-2.9.4-new/python/types.c
1
+--- libxml2-2.9.4/python/types.c	2016-02-09 02:17:33.000000000 -0800
2
+@@ -31,8 +31,12 @@ libxml_PyFileGet(PyObject *f) {
3
+     const char *mode;
4
+ 
5
+     fd = PyObject_AsFileDescriptor(f);
6
+-    if (!_PyVerify_fd(fd))
7
+-        return(NULL);
8
++    /*
9
++     * https://bugzilla.gnome.org/show_bug.cgi?id=776815
10
++     * if (!_PyVerify_fd(fd))
11
++     *   return(NULL);
12
++    */
13
++
14
+     /*
15
+      * Get the flags on the fd to understand how it was opened
16
+      */
... ...
@@ -4,7 +4,7 @@
4 4
 Summary:        Libxml2
5 5
 Name:           libxml2
6 6
 Version:        2.9.4
7
-Release:        11%{?dist}
7
+Release:        12%{?dist}
8 8
 License:        MIT
9 9
 URL:            http://xmlsoft.org/
10 10
 Group:          System Environment/General Libraries
... ...
@@ -22,6 +22,8 @@ Patch3:         libxml2-fix-buffer-size-checks.patch
22 22
 Patch4:         libxml2-fix-handling-of-parameter-entity-references.patch
23 23
 Patch5:         libxml2-fix-handling-of-parameter-entity-references-test.patch
24 24
 Patch6:         CVE-2017-8872.patch
25
+#https://bugs.python.org/issue23524
26
+Patch7:         libxml2-2.9.4-remove-_PyVerify_fd-call.patch
25 27
 %define sha1    libxml2=958ae70baf186263a4bd801a81dd5d682aedd1db
26 28
 Provides:       pkgconfig(libxml-2.0)
27 29
 
... ...
@@ -66,6 +68,7 @@ Static libraries and header files for the support library for libxml
66 66
 %patch4 -p1
67 67
 %patch5 -p1
68 68
 %patch6 -p1
69
+%patch7 -p1
69 70
 sed \
70 71
   -e /xmlInitializeCatalog/d \
71 72
   -e 's/((ent->checked =.*&&/(((ent->checked == 0) ||\
... ...
@@ -131,6 +134,8 @@ rm -rf %{buildroot}/*
131 131
 
132 132
 
133 133
 %changelog
134
+*   Mon Oct 2 2017 Anish Swaminathan <anishs@vmware.com> 2.9.4-12
135
+-   Remove call to _PyVerify_fd
134 136
 *   Wed Aug 09 2017 Dheeraj Shetty <dheerajs@vmware.com> 2.9.4-11
135 137
 -   Apply patch for CVE-2017-8872
136 138
 *   Mon Aug 07 2017 Danut Moraru <dmoraru@vmware.com> 2.9.4-10