summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-11-06 05:31:10 +0000
committerNick Mathewson <nickm@torproject.org>2007-11-06 05:31:10 +0000
commit559f7e662f5f58dac40cbc98e0e0dd92a1951fd6 (patch)
tree3fb758c268232688295073bb2d62a96ae79d5cc6
parente64504572a4821f5286c8207d21c6e15190ef10b (diff)
downloadlibevent-559f7e662f5f58dac40cbc98e0e0dd92a1951fd6.tar.gz
r14736@tombo: nickm | 2007-11-06 00:26:51 -0500
Backport fix for crash in evdns_resolve_reverse_ipv6(). svn:r477
-rw-r--r--ChangeLog1
-rw-r--r--evdns.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1d5d4684..3e98d645 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@ Changes since 1.3e:
o Fix evport implementation: port_disassociate called on unassociated events resulting in bogus errors; more efficient memory management; from Trond Norbye and Prakash Sangappa
o Build correctly outside of the source tree. (Patch from Kelly Anderson)
o Fix evhttp.h compilation when TAILQ_ENTRY is not defined.
+ o Fix buffer overrun in evdns_resolve_reverse_ipv6 (backported)
Changes since 1.3d:
o demote most http warnings to debug messages
diff --git a/evdns.c b/evdns.c
index 597f1093..9714bcd0 100644
--- a/evdns.c
+++ b/evdns.c
@@ -2263,7 +2263,8 @@ int evdns_resolve_reverse(struct in_addr *in, int flags, evdns_callback_type cal
}
int evdns_resolve_reverse_ipv6(struct in6_addr *in, int flags, evdns_callback_type callback, void *ptr) {
- char buf[64];
+ /* 32 nybbles, 32 periods, "ip6.arpa", NUL. */
+ char buf[73];
char *cp;
struct request *req;
int i;