(res_querydomain): Avoid potential buffer overrun.
authordrepper <drepper>
Fri, 23 May 1997 15:31:34 +0000 (15:31 +0000)
committerdrepper <drepper>
Fri, 23 May 1997 15:31:34 +0000 (15:31 +0000)
resolv/res_query.c

index 545e009..28ac382 100644 (file)
@@ -321,7 +321,7 @@ res_querydomain(name, domain, class, type, answer, anslen)
        u_char *answer;         /* buffer to put answer */
        int anslen;             /* size of answer */
 {
-       char nbuf[MAXDNAME];
+       char nbuf[MAXDNAME * 2 + 2];
        const char *longname = nbuf;
        int n;