mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-15 02:00:00 -04:00
address len being shadowed
This commit is contained in:
parent
7e80eac638
commit
f260e3a188
1 changed files with 6 additions and 6 deletions
|
|
@ -177,22 +177,22 @@ main(int argc, char *argv[]) {
|
|||
if (tcp) {
|
||||
unsigned char *p = b;
|
||||
while (p < bp) {
|
||||
unsigned int len;
|
||||
unsigned int tcplen;
|
||||
|
||||
if (p + 2 > bp) {
|
||||
fprintf(stderr, "premature end of packet\n");
|
||||
exit(1);
|
||||
}
|
||||
len = p[0] << 8 | p[1];
|
||||
tcplen = p[0] << 8 | p[1];
|
||||
|
||||
if (p + 2 + len > bp) {
|
||||
if (p + 2 + tcplen > bp) {
|
||||
fprintf(stderr, "premature end of packet\n");
|
||||
exit(1);
|
||||
}
|
||||
isc_buffer_init(&source, p + 2, len);
|
||||
isc_buffer_add(&source, len);
|
||||
isc_buffer_init(&source, p + 2, tcplen);
|
||||
isc_buffer_add(&source, tcplen);
|
||||
process_message(&source);
|
||||
p += 2 + len;
|
||||
p += 2 + tcplen;
|
||||
}
|
||||
} else {
|
||||
isc_buffer_init(&source, b, sizeof(b));
|
||||
|
|
|
|||
Loading…
Reference in a new issue