diff options
Diffstat (limited to 'contrib/bind/lib/nameser/ns_parse.c')
-rw-r--r-- | contrib/bind/lib/nameser/ns_parse.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/contrib/bind/lib/nameser/ns_parse.c b/contrib/bind/lib/nameser/ns_parse.c index f3f92c68d7ce..abd48f2edeae 100644 --- a/contrib/bind/lib/nameser/ns_parse.c +++ b/contrib/bind/lib/nameser/ns_parse.c @@ -16,7 +16,7 @@ */ #ifndef lint -static const char rcsid[] = "$Id: ns_parse.c,v 8.17 2001/06/20 02:50:49 marka Exp $"; +static const char rcsid[] = "$Id: ns_parse.c,v 8.18 2003/04/03 06:10:10 marka Exp $"; #endif /* Import. */ @@ -132,9 +132,10 @@ ns_initparse(const u_char *msg, int msglen, ns_msg *handle) { int ns_parserr(ns_msg *handle, ns_sect section, int rrnum, ns_rr *rr) { int b; + int tmp; /* Make section right. */ - if (section >= ns_s_max) + if ((tmp = section) < 0 || section >= ns_s_max) RETERR(ENODEV); if (section != handle->_sect) setsection(handle, section); |