Date: Wed, 26 Apr 2000 09:00:05 -0700 (PDT) From: Bill Fenner <fenner@research.att.com> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/18221: DNS resolver can fail for large DNS responses Message-ID: <200004261600.JAA46940@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/18221; it has been noted by GNATS. From: Bill Fenner <fenner@research.att.com> To: john@nlc.net.au Cc: freebsd-gnats-submit@freebsd.org Subject: Re: bin/18221: DNS resolver can fail for large DNS responses Date: Wed, 26 Apr 2000 08:08:32 -0700 I didn't return the truncated response because I was worried about whether all the relevant functions handled truncated responses. Have you checked this? >@@ -666,7 +669,6 @@ > } > if (n > sizeof buf.buf) { > dprintf("static buffer is too small (%d)\n", n); >- return (NULL); > } > if (!(hp = gethostanswer(&buf, n, qbuf, T_PTR))) > return (NULL); /* h_errno was set by gethostanswer() */ Didn't you just reintroduce the buffer overrun? (e.g. you at least want to truncate n to sizeof buf.buf) Bill To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200004261600.JAA46940>