[nginx] svn commit: r4288 - in branches/stable-1.0: . src/core
igor at sysoev.ru
igor at sysoev.ru
Mon Nov 14 16:12:26 UTC 2011
Author: is
Date: 2011-11-14 16:12:25 +0000 (Mon, 14 Nov 2011)
New Revision: 4288
Modified:
branches/stable-1.0/
branches/stable-1.0/src/core/ngx_resolver.c
Log:
Merge of r4268:
Fixed compression pointer processing in DNS response greater than 255 bytes.
Thanks to Ben Hawkes.
Property changes on: branches/stable-1.0
___________________________________________________________________
Modified: svn:mergeinfo
- /trunk:3960-3974,3977-3987,3991-3996,3998,4003-4007,4009-4013,4015-4018,4020,4023,4025-4027,4034-4065,4073,4077,4086-4090,4094-4102,4106-4108,4113-4114,4129-4137,4143,4147-4152,4154-4158,4177,4179,4182-4184,4186-4187,4189-4205,4207,4209-4210,4212,4219-4220,4229-4230,4232,4235-4237
+ /trunk:3960-3974,3977-3987,3991-3996,3998,4003-4007,4009-4013,4015-4018,4020,4023,4025-4027,4034-4065,4073,4077,4086-4090,4094-4102,4106-4108,4113-4114,4129-4137,4143,4147-4152,4154-4158,4177,4179,4182-4184,4186-4187,4189-4205,4207,4209-4210,4212,4219-4220,4229-4230,4232,4235-4237,4268
Modified: branches/stable-1.0/src/core/ngx_resolver.c
===================================================================
--- branches/stable-1.0/src/core/ngx_resolver.c 2011-11-14 15:53:35 UTC (rev 4287)
+++ branches/stable-1.0/src/core/ngx_resolver.c 2011-11-14 16:12:25 UTC (rev 4288)
@@ -1922,7 +1922,13 @@
n = *src++;
for ( ;; ) {
- if (n != 0xc0) {
+ if (n & 0xc0) {
+ n = ((n & 0x3f) << 8) + *src;
+ src = &buf[n];
+
+ n = *src++;
+
+ } else {
ngx_memcpy(dst, src, n);
dst += n;
src += n;
@@ -1932,12 +1938,6 @@
if (n != 0) {
*dst++ = '.';
}
-
- } else {
- n = ((n & 0x3f) << 8) + *src;
- src = &buf[n];
-
- n = *src++;
}
if (n == 0) {
More information about the nginx-devel
mailing list