Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2347)

Unified Diff: third_party/libxml/chromium/libxml2-2.9.4-security-CVE-2017-7376-nanohttp-out-of-bounds-write.patch

Issue 2797923004: Improve XML serialization, URI parsing, and XPath node set processing. (Closed)
Patch Set: Rebase. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/libxml/chromium/libxml2-2.9.4-security-CVE-2017-7376-nanohttp-out-of-bounds-write.patch
diff --git a/third_party/libxml/chromium/libxml2-2.9.4-security-CVE-2017-7376-nanohttp-out-of-bounds-write.patch b/third_party/libxml/chromium/libxml2-2.9.4-security-CVE-2017-7376-nanohttp-out-of-bounds-write.patch
new file mode 100644
index 0000000000000000000000000000000000000000..e60fe8fa9ee17afbdf04c5c6b1f8afedf6cd2132
--- /dev/null
+++ b/third_party/libxml/chromium/libxml2-2.9.4-security-CVE-2017-7376-nanohttp-out-of-bounds-write.patch
@@ -0,0 +1,21 @@
+https://bugzilla.gnome.org/show_bug.cgi?id=780690
+
+--- src/uri.c
++++ src/uri.c
+@@ -12,6 +12,7 @@
+ #include "third_party/libxml/src/libxml.h"
+
+ #include <string.h>
++#include <limits.h>
+
+ #include "third_party/libxml/src/include/libxml/xmlmemory.h"
+ #include "third_party/libxml/src/include/libxml/uri.h"
+@@ -334,7 +335,7 @@ xmlParse3986Port(xmlURIPtr uri, const char **str)
+ cur++;
+ }
+ if (uri != NULL)
+- uri->port = port & INT_MAX; /* port value modulo INT_MAX+1 */
++ uri->port = port & USHRT_MAX; /* port value modulo USHRT_MAX+1 */
+ *str = cur;
+ return(0);
+ }

Powered by Google App Engine
This is Rietveld 408576698