diff options
author | Igor Sysoev <igor@sysoev.ru> | 2008-11-20 20:24:16 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2008-11-20 20:24:16 +0300 |
commit | 6ef713bdd05bdaf2bedecbd9071f52e2eefab9ae (patch) | |
tree | 4dd144fe26fff1b19866c475bf35e0e370b1ba86 | |
parent | d0d575bcd5201eab1aacdf682f6fc11d1f46c682 (diff) |
r2315 merge:
fix compression pointer for big (>255) DNS responses
-rw-r--r-- | src/core/ngx_resolver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/ngx_resolver.c b/src/core/ngx_resolver.c index a7fe056e6..2998bb2e0 100644 --- a/src/core/ngx_resolver.c +++ b/src/core/ngx_resolver.c @@ -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++; |