author | Rich Burridge <rich.burridge@oracle.com> |
Tue, 07 Feb 2017 16:50:47 -0800 | |
branch | s11u3-sru |
changeset 7653 | 02748c64c0e3 |
permissions | -rw-r--r-- |
7653
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
1 |
Fix for CVE-2016-10197 |
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
2 |
|
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
3 |
More details at: |
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
4 |
|
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
5 |
https://github.com/libevent/libevent/issues/332 |
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
6 |
|
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
7 |
Based on commit at: |
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
8 |
|
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
9 |
https://github.com/libevent/libevent/commit/ec65c42052d95d2c23d1d837136d1cf1d9ecef9e |
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
10 |
|
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
11 |
--- libevent-1.4.14/evdns.c.orig 2017-02-03 06:49:17.767210211 +0000 |
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
12 |
+++ libevent-1.4.14/evdns.c 2017-02-03 06:50:41.005061826 +0000 |
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
13 |
@@ -2492,9 +2491,11 @@ |
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
14 |
static char * |
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
15 |
search_make_new(const struct search_state *const state, int n, const char *const base_name) { |
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
16 |
const int base_len = strlen(base_name); |
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
17 |
- const char need_to_append_dot = base_name[base_len - 1] == '.' ? 0 : 1; |
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
18 |
+ char need_to_append_dot; |
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
19 |
struct search_domain *dom; |
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
20 |
|
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
21 |
+ if (!base_len) return NULL; |
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
22 |
+ need_to_append_dot = base_name[base_len - 1] == '.' ? 0 : 1; |
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
23 |
for (dom = state->head; dom; dom = dom->next) { |
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
24 |
if (!n--) { |
02748c64c0e3
25489439 problem in LIBRARY/LIBEVENT
Rich Burridge <rich.burridge@oracle.com>
parents:
diff
changeset
|
25 |
/* this is the postfix we want */ |