diff options
author | Trevor Johnson <trevor@FreeBSD.org> | 2002-07-10 06:57:44 +0000 |
---|---|---|
committer | Trevor Johnson <trevor@FreeBSD.org> | 2002-07-10 06:57:44 +0000 |
commit | 7f484866a20db7df608d7cfa9ab8e8bc089a5de8 (patch) | |
tree | 2858702d2f7d2e723a783d00f63ac2a2cae6f41a /lib/libc/net/gethostbydns.c | |
parent | 2a86dbea9c07a9c9b263025146cf294248a2a21a (diff) | |
download | src-7f484866a20db7df608d7cfa9ab8e8bc089a5de8.tar.gz src-7f484866a20db7df608d7cfa9ab8e8bc089a5de8.zip |
MFC: fix buffer overflows described in FreeBSD-SA-02:28.resolv.
Reviewed by: imp
Notes
Notes:
svn path=/releng/4.3/; revision=99716
Diffstat (limited to 'lib/libc/net/gethostbydns.c')
-rw-r--r-- | lib/libc/net/gethostbydns.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libc/net/gethostbydns.c b/lib/libc/net/gethostbydns.c index a5a3e7bb30fe..52ac91a041be 100644 --- a/lib/libc/net/gethostbydns.c +++ b/lib/libc/net/gethostbydns.c @@ -389,6 +389,7 @@ gethostanswer(answer, anslen, qname, qtype) buflen -= nn; } + buflen -= sizeof(align) - ((u_long)bp % sizeof(align)); bp += sizeof(align) - ((u_long)bp % sizeof(align)); if (bp + n >= &hostbuf[sizeof hostbuf]) { |