- Fix another possibly undefined pointer operations in tor_memmem
fallback implementation. Another case of bug #10363; bugfix on
0.1.1.1-alpha.
+ - Fix another possibly undefined pointer operations in the eventdns
+ fallback implementation. Another case of bug #10363; bugfix on
+ 0.1.2.1-alpha.
}
if (label_len > 63) return -1;
if (cp != name_out) {
- if (cp + 1 >= end) return -1;
+ if (cp >= name_out + name_out_len - 1) return -1;
*cp++ = '.';
}
- if (cp + label_len >= end) return -1;
+ if (label_len > name_out_len ||
+ cp >= name_out + name_out_len - label_len) return -1;
memcpy(cp, packet + j, label_len);
cp += label_len;
j += label_len;