mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
fix compression pointer for big (>255) DNS responses
This commit is contained in:
parent
b4407c27cb
commit
b3ac4fb27c
@ -1866,7 +1866,7 @@ ngx_resolver_copy(ngx_resolver_t *r, ngx_str_t *name, u_char *buf, u_char *src,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (n & 0xc0) {
|
if (n & 0xc0) {
|
||||||
n = (n & 0x3f << 8) + *p;
|
n = ((n & 0x3f) << 8) + *p;
|
||||||
p = &buf[n];
|
p = &buf[n];
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -1916,7 +1916,7 @@ done:
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
n = (n & 0x3f << 8) + *src;
|
n = ((n & 0x3f) << 8) + *src;
|
||||||
src = &buf[n];
|
src = &buf[n];
|
||||||
|
|
||||||
n = *src++;
|
n = *src++;
|
||||||
|
Loading…
Reference in New Issue
Block a user