components/libevent/patches/CVE-2016-10197.patch
branchs11u3-sru
changeset 7653 02748c64c0e3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libevent/patches/CVE-2016-10197.patch	Tue Feb 07 16:50:47 2017 -0800
@@ -0,0 +1,25 @@
+Fix for CVE-2016-10197
+
+More details at:
+
+  https://github.com/libevent/libevent/issues/332
+
+Based on commit at:
+
+  https://github.com/libevent/libevent/commit/ec65c42052d95d2c23d1d837136d1cf1d9ecef9e
+
+--- libevent-1.4.14/evdns.c.orig	2017-02-03 06:49:17.767210211 +0000
++++ libevent-1.4.14/evdns.c	2017-02-03 06:50:41.005061826 +0000
+@@ -2492,9 +2491,11 @@
+ static char *
+ search_make_new(const struct search_state *const state, int n, const char *const base_name) {
+ 	const int base_len = strlen(base_name);
+-	const char need_to_append_dot = base_name[base_len - 1] == '.' ? 0 : 1;
++	char need_to_append_dot;
+ 	struct search_domain *dom;
+ 
++	if (!base_len) return NULL;
++	need_to_append_dot = base_name[base_len - 1] == '.' ? 0 : 1;
+ 	for (dom = state->head; dom; dom = dom->next) {
+ 		if (!n--) {
+ 			/* this is the postfix we want */