Skip to content
Snippets Groups Projects
Commit 9fa707f5 authored by Nick Mathewson's avatar Nick Mathewson :game_die:
Browse files

r11552@Kushana: nickm | 2006-12-12 13:34:13 -0500

 fix a signed/unsigned comparison in eventdns.c


svn:r9092
parent 5f688503
No related branches found
No related tags found
No related merge requests found
......@@ -1476,7 +1476,7 @@ dnsname_to_labels(u8 *const buf, size_t buf_len, off_t j,
if (!name) {
const unsigned int label_len = end - start;
if (label_len > 63) return -1;
if (j+label_len+1 > buf_len) return -2;
if ((size_t)(j+label_len+1) > buf_len) return -2;
if (table) dnslabel_table_add(table, start, j);
buf[j++] = label_len;
......@@ -1487,7 +1487,7 @@ dnsname_to_labels(u8 *const buf, size_t buf_len, off_t j,
// append length of the label.
const unsigned int label_len = name - start;
if (label_len > 63) return -1;
if (j+label_len+1 > buf_len) return -2;
if ((size_t)(j+label_len+1) > buf_len) return -2;
if (table) dnslabel_table_add(table, start, j);
buf[j++] = label_len;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment