Klaus Demo nginx / 13f1b5a
Merge of r4268: Fixed compression pointer processing in DNS response greater than 255 bytes. Thanks to Ben Hawkes. Igor Sysoev 10 years ago
1 changed file(s) with 7 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
19211921 n = *src++;
19221922
19231923 for ( ;; ) {
1924 if (n != 0xc0) {
1924 if (n & 0xc0) {
1925 n = ((n & 0x3f) << 8) + *src;
1926 src = &buf[n];
1927
1928 n = *src++;
1929
1930 } else {
19251931 ngx_memcpy(dst, src, n);
19261932 dst += n;
19271933 src += n;
19311937 if (n != 0) {
19321938 *dst++ = '.';
19331939 }
1934
1935 } else {
1936 n = ((n & 0x3f) << 8) + *src;
1937 src = &buf[n];
1938
1939 n = *src++;
19401940 }
19411941
19421942 if (n == 0) {