r2315 merge:

fix compression pointer for big (>255) DNS responses
This commit is contained in:
Igor Sysoev 2008-11-20 17:24:16 +00:00
parent d0d575bcd5
commit 6ef713bdd0

View File

@ -1836,7 +1836,7 @@ ngx_resolver_copy(ngx_resolver_t *r, ngx_str_t *name, u_char *buf, u_char *src,
}
if (n & 0xc0) {
n = (n & 0x3f << 8) + *p;
n = ((n & 0x3f) << 8) + *p;
p = &buf[n];
} else {
@ -1886,7 +1886,7 @@ done:
}
} else {
n = (n & 0x3f << 8) + *src;
n = ((n & 0x3f) << 8) + *src;
src = &buf[n];
n = *src++;