equal
deleted
inserted
replaced
|
1 Fix for CVE-2016-10196 |
|
2 |
|
3 More details at: |
|
4 |
|
5 https://github.com/libevent/libevent/issues/318 |
|
6 |
|
7 Based on commit at: |
|
8 |
|
9 https://github.com/libevent/libevent/commit/329acc18a0768c21ba22522f01a5c7f46cacc4d5 |
|
10 |
|
11 --- libevent-2.0.22/evutil.c.orig 2017-02-02 07:20:55.460219824 +0000 |
|
12 +++ libevent-2.0.22/evutil.c 2017-02-02 07:25:18.285916416 +0000 |
|
13 @@ -1808,12 +1808,12 @@ |
|
14 |
|
15 cp = strchr(ip_as_string, ':'); |
|
16 if (*ip_as_string == '[') { |
|
17 - int len; |
|
18 + size_t len; |
|
19 if (!(cp = strchr(ip_as_string, ']'))) { |
|
20 return -1; |
|
21 } |
|
22 - len = (int) ( cp-(ip_as_string + 1) ); |
|
23 - if (len > (int)sizeof(buf)-1) { |
|
24 + len = ( cp-(ip_as_string + 1) ); |
|
25 + if (len > sizeof(buf)-1) { |
|
26 return -1; |
|
27 } |
|
28 memcpy(buf, ip_as_string+1, len); |