summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libc/net/gethostnamadr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libc/net/gethostnamadr.c b/lib/libc/net/gethostnamadr.c
index 0be63bec835..89afb634f1a 100644
--- a/lib/libc/net/gethostnamadr.c
+++ b/lib/libc/net/gethostnamadr.c
@@ -48,7 +48,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.57 2003/06/27 22:23:05 vincent Exp $";
+static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.58 2003/10/03 19:48:10 millert Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -231,19 +231,19 @@ getanswer(answer, anslen, qname, qtype)
continue;
}
cp += n; /* name */
- if (cp > eom)
+ if (cp >= eom)
break;
type = _getshort(cp);
cp += INT16SZ; /* type */
- if (cp > eom)
+ if (cp >= eom)
break;
class = _getshort(cp);
cp += INT16SZ + INT32SZ; /* class, TTL */
- if (cp > eom)
+ if (cp >= eom)
break;
n = _getshort(cp);
cp += INT16SZ; /* len */
- if (cp > eom)
+ if (cp >= eom)
break;
if (type == T_SIG) {
/* XXX - ignore signatures as we don't use them yet */