[or-cvs] r13620: Make the last of the veracode warning issues get fixed. (in tor/trunk: . src/or)
nickm at seul.org
nickm at seul.org
Wed Feb 20 17:03:17 UTC 2008
Author: nickm
Date: 2008-02-20 12:03:16 -0500 (Wed, 20 Feb 2008)
New Revision: 13620
Modified:
tor/trunk/
tor/trunk/src/or/eventdns.c
Log:
r18259 at catbus: nickm | 2008-02-20 12:03:15 -0500
Make the last of the veracode warning issues get fixed.
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r18259] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/src/or/eventdns.c
===================================================================
--- tor/trunk/src/or/eventdns.c 2008-02-20 16:57:41 UTC (rev 13619)
+++ tor/trunk/src/or/eventdns.c 2008-02-20 17:03:16 UTC (rev 13620)
@@ -1372,7 +1372,7 @@
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 @@
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;
More information about the tor-commits
mailing list