diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-02-20 17:03:16 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-02-20 17:03:16 +0000 |
commit | dc949b846a0d41ed4450723d1dd17f15ef37a7dd (patch) | |
tree | c4d758b50a1bddb56818561341cea63317000a2a /src/or/eventdns.c | |
parent | 88efec10a2f4f06ee667c6dea49a27b87dc6aaa1 (diff) | |
download | tor-dc949b846a0d41ed4450723d1dd17f15ef37a7dd.tar.gz tor-dc949b846a0d41ed4450723d1dd17f15ef37a7dd.zip |
r18259@catbus: nickm | 2008-02-20 12:03:15 -0500
Make the last of the veracode warning issues get fixed.
svn:r13620
Diffstat (limited to 'src/or/eventdns.c')
-rw-r--r-- | src/or/eventdns.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/eventdns.c b/src/or/eventdns.c index 744077c724..87aaa2d57e 100644 --- a/src/or/eventdns.c +++ b/src/or/eventdns.c @@ -1372,7 +1372,7 @@ dnsname_to_labels(u8 *const buf, size_t buf_len, off_t j, if (table) dnslabel_table_add(table, start, j); buf[j++] = label_len; - memcpy(buf + j, start, end - start); + memcpy(buf + j, start, label_len); j += end - start; break; } else { @@ -2186,6 +2186,7 @@ evdns_nameserver_ip_add(const char *ip_as_string) { if ((cp-ip_as_string) >= (int)sizeof(buf)) { return 4; } + tor_assert(cp >= ip_as_string); memcpy(buf, ip_as_string, cp-ip_as_string); buf[cp-ip_as_string] = '\0'; cp = buf; |