Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/net correct a use of sizeof() against nsaddr_list.
details: https://anonhg.NetBSD.org/src/rev/54c0dad1fa3b
branches: trunk
changeset: 485332:54c0dad1fa3b
user: itojun <itojun%NetBSD.org@localhost>
date: Tue Apr 25 08:56:06 2000 +0000
description:
correct a use of sizeof() against nsaddr_list.
diffstat:
lib/libc/net/res_init.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 7bd574d84f2c -r 54c0dad1fa3b lib/libc/net/res_init.c
--- a/lib/libc/net/res_init.c Tue Apr 25 08:51:39 2000 +0000
+++ b/lib/libc/net/res_init.c Tue Apr 25 08:56:06 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: res_init.c,v 1.30 2000/04/25 08:51:39 itojun Exp $ */
+/* $NetBSD: res_init.c,v 1.31 2000/04/25 08:56:06 itojun Exp $ */
/*-
* Copyright (c) 1985, 1989, 1993
@@ -59,7 +59,7 @@
static char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
static char rcsid[] = "Id: res_init.c,v 8.8 1997/06/01 20:34:37 vixie Exp ";
#else
-__RCSID("$NetBSD: res_init.c,v 1.30 2000/04/25 08:51:39 itojun Exp $");
+__RCSID("$NetBSD: res_init.c,v 1.31 2000/04/25 08:56:06 itojun Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -151,7 +151,7 @@
_res.nsaddr.sin_addr.s_addr = INADDR_ANY;
#endif
#ifdef INET6
- if (sizeof(_res_ext.nsaddr) >= sizeof(_res.nsaddr))
+ if (sizeof(_res_ext.nsaddr) >= _res.nsaddr.sin_len)
memcpy(&_res_ext.nsaddr, &_res.nsaddr, _res.nsaddr.sin_len);
#endif
_res.nscount = 1;
Home |
Main Index |
Thread Index |
Old Index