This commit is contained in:
Bjorn Andersson 2006-08-16 20:18:16 +00:00
parent 4a9887c9df
commit a3735705c7
1 changed files with 3 additions and 2 deletions

5
read.c
View File

@ -31,6 +31,7 @@ readname(char *packet, char **src, char *dst, size_t length)
p = *src;
while(*p && len < length) {
c = *p++;
len++;
/* is this a compressed label? */
if((c & 0xc0) == 0xc0) {
@ -47,9 +48,9 @@ readname(char *packet, char **src, char *dst, size_t length)
}
if (*p != 0)
*dst = '.';
*dst++ = '.';
else
*dst = '\0';
*dst++ = '\0';
}
(*src) = p+1;