diff --git a/src/kits/network/netresolv/resolv/herror.c b/src/kits/network/netresolv/resolv/herror.c index bd6255d5f2..58c2b8a42c 100644 --- a/src/kits/network/netresolv/resolv/herror.c +++ b/src/kits/network/netresolv/resolv/herror.c @@ -1,4 +1,4 @@ -/* $NetBSD: herror.c,v 1.9 2012/03/13 21:13:43 christos Exp $ */ +/* $NetBSD: herror.c,v 1.10 2015/02/24 17:56:20 christos Exp $ */ /* * Copyright (c) 1987, 1993 @@ -12,11 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/src/kits/network/netresolv/resolv/res_comp.c b/src/kits/network/netresolv/resolv/res_comp.c index 4557ac15fa..9c32acf92f 100644 --- a/src/kits/network/netresolv/resolv/res_comp.c +++ b/src/kits/network/netresolv/resolv/res_comp.c @@ -1,4 +1,4 @@ -/* $NetBSD: res_comp.c,v 1.12 2012/03/13 21:13:43 christos Exp $ */ +/* $NetBSD: res_comp.c,v 1.13 2015/02/24 17:56:20 christos Exp $ */ /* * Copyright (c) 1985, 1993 @@ -12,11 +12,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/src/kits/network/netresolv/resolv/res_debug.c b/src/kits/network/netresolv/resolv/res_debug.c index 7d096bcf70..63a14c1ebc 100644 --- a/src/kits/network/netresolv/resolv/res_debug.c +++ b/src/kits/network/netresolv/resolv/res_debug.c @@ -1,4 +1,4 @@ -/* $NetBSD: res_debug.c,v 1.13 2012/06/25 22:32:45 abs Exp $ */ +/* $NetBSD: res_debug.c,v 1.14 2015/02/24 17:56:20 christos Exp $ */ /* * Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") @@ -29,11 +29,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * diff --git a/src/kits/network/netresolv/resolv/res_init.c b/src/kits/network/netresolv/resolv/res_init.c index 0e218f6009..74c665a8f2 100644 --- a/src/kits/network/netresolv/resolv/res_init.c +++ b/src/kits/network/netresolv/resolv/res_init.c @@ -1,4 +1,4 @@ -/* $NetBSD: res_init.c,v 1.26 2012/09/09 18:04:26 christos Exp $ */ +/* $NetBSD: res_init.c,v 1.30 2015/02/24 17:56:20 christos Exp $ */ /* * Copyright (c) 1985, 1989, 1993 @@ -240,7 +240,7 @@ __res_vinit(res_state statp, int preinit) { * Examples and applications exist which do not check * our return code. Furthermore several applications * simply call us to get the systems domainname. So - * rather then immediately fail here we store the + * rather than immediately fail here we store the * failure, which is returned later, in h_errno. And * prevent the collection of 'nameserver' information * by setting maxns to 0. Thus applications that fail diff --git a/src/kits/network/netresolv/resolv/res_mkquery.c b/src/kits/network/netresolv/resolv/res_mkquery.c index 6e7b394433..743a22bb3f 100644 --- a/src/kits/network/netresolv/resolv/res_mkquery.c +++ b/src/kits/network/netresolv/resolv/res_mkquery.c @@ -1,4 +1,4 @@ -/* $NetBSD: res_mkquery.c,v 1.13 2012/03/13 21:13:43 christos Exp $ */ +/* $NetBSD: res_mkquery.c,v 1.15 2015/02/24 17:56:20 christos Exp $ */ /* * Portions Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") @@ -29,11 +29,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -235,7 +231,9 @@ res_nopt(res_state statp, *cp++ = 0; /*%< "." */ ns_put16(ns_t_opt, cp); /*%< TYPE */ cp += INT16SZ; - ns_put16(anslen & 0xffff, cp); /*%< CLASS = UDP payload size */ + if (anslen > 0xffff) + anslen = 0xffff; + ns_put16(anslen, cp); /*%< CLASS = UDP payload size */ cp += INT16SZ; *cp++ = NOERROR; /*%< extended RCODE */ *cp++ = 0; /*%< EDNS version */ diff --git a/src/kits/network/netresolv/resolv/res_query.c b/src/kits/network/netresolv/resolv/res_query.c index 0590b937ab..b60bc4cab9 100644 --- a/src/kits/network/netresolv/resolv/res_query.c +++ b/src/kits/network/netresolv/resolv/res_query.c @@ -1,4 +1,4 @@ -/* $NetBSD: res_query.c,v 1.14 2012/03/13 21:13:44 christos Exp $ */ +/* $NetBSD: res_query.c,v 1.16 2015/02/24 17:56:20 christos Exp $ */ /* * Portions Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") @@ -29,11 +29,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -410,7 +406,7 @@ res_hostalias(const res_state statp, const char *name, char *dst, size_t siz) { return (NULL); file = getenv("HOSTALIASES"); - if (file == NULL || (fp = fopen(file, "r")) == NULL) + if (file == NULL || (fp = fopen(file, "re")) == NULL) return (NULL); buf[sizeof(buf) - 1] = '\0'; while (fgets(buf, (int)sizeof(buf), fp)) { diff --git a/src/kits/network/netresolv/resolv/res_send.c b/src/kits/network/netresolv/resolv/res_send.c index 5c591c0bb7..2109413378 100644 --- a/src/kits/network/netresolv/resolv/res_send.c +++ b/src/kits/network/netresolv/resolv/res_send.c @@ -27,11 +27,7 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors + * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. *