comparison src/core/ngx_resolver.c @ 640:97a1e05203c2 NGINX_1_0_10

nginx 1.0.10 *) Bugfix: a segmentation fault might occur in a worker process if resolver got a big DNS response. Thanks to Ben Hawkes. *) Bugfix: in cache key calculation if internal MD5 implementation was used; the bug had appeared in 1.0.4. *) Bugfix: the module ngx_http_mp4_module sent incorrect "Content-Length" response header line if the "start" argument was used. Thanks to Piotr Sikora.
author Igor Sysoev <http://sysoev.ru>
date Tue, 15 Nov 2011 00:00:00 +0400
parents 8dc007eddbcf
children ad25218fd14b
comparison
equal deleted inserted replaced
639:6a2ff3b3f4c4 640:97a1e05203c2
1920 name->data = dst; 1920 name->data = dst;
1921 1921
1922 n = *src++; 1922 n = *src++;
1923 1923
1924 for ( ;; ) { 1924 for ( ;; ) {
1925 if (n != 0xc0) { 1925 if (n & 0xc0) {
1926 n = ((n & 0x3f) << 8) + *src;
1927 src = &buf[n];
1928
1929 n = *src++;
1930
1931 } else {
1926 ngx_memcpy(dst, src, n); 1932 ngx_memcpy(dst, src, n);
1927 dst += n; 1933 dst += n;
1928 src += n; 1934 src += n;
1929 1935
1930 n = *src++; 1936 n = *src++;
1931 1937
1932 if (n != 0) { 1938 if (n != 0) {
1933 *dst++ = '.'; 1939 *dst++ = '.';
1934 } 1940 }
1935
1936 } else {
1937 n = ((n & 0x3f) << 8) + *src;
1938 src = &buf[n];
1939
1940 n = *src++;
1941 } 1941 }
1942 1942
1943 if (n == 0) { 1943 if (n == 0) {
1944 name->len = dst - name->data; 1944 name->len = dst - name->data;
1945 return NGX_OK; 1945 return NGX_OK;