Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/lib/libc/net Pull up revision 1.23 (requested by itojun...
details: https://anonhg.NetBSD.org/src/rev/65adcbd5d087
branches: netbsd-1-6
changeset: 529051:65adcbd5d087
user: lukem <lukem%NetBSD.org@localhost>
date: Wed Aug 28 09:42:57 2002 +0000
description:
Pull up revision 1.23 (requested by itojun in ticket #739):
Limit UDP payload size for EDNS0 to 0xffff, not use lower 16bit value.
diffstat:
lib/libc/net/res_mkquery.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (29 lines):
diff -r aed66a1cd3b9 -r 65adcbd5d087 lib/libc/net/res_mkquery.c
--- a/lib/libc/net/res_mkquery.c Wed Aug 28 02:33:36 2002 +0000
+++ b/lib/libc/net/res_mkquery.c Wed Aug 28 09:42:57 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: res_mkquery.c,v 1.21.4.1 2002/08/17 15:44:50 lukem Exp $ */
+/* $NetBSD: res_mkquery.c,v 1.21.4.2 2002/08/28 09:42:57 lukem Exp $ */
/*-
* Copyright (c) 1985, 1993
@@ -59,7 +59,7 @@
static char sccsid[] = "@(#)res_mkquery.c 8.1 (Berkeley) 6/4/93";
static char rcsid[] = "Id: res_mkquery.c,v 8.5 1996/08/27 08:33:28 vixie Exp ";
#else
-__RCSID("$NetBSD: res_mkquery.c,v 1.21.4.1 2002/08/17 15:44:50 lukem Exp $");
+__RCSID("$NetBSD: res_mkquery.c,v 1.21.4.2 2002/08/28 09:42:57 lukem Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -230,7 +230,9 @@
__putshort(T_OPT, cp); /* TYPE */
cp += INT16SZ;
- __putshort(anslen & 0xffff, cp); /* CLASS = UDP payload size */
+ if (anslen > 0xffff)
+ anslen = 0xffff; /* limit to 16bit value */
+ __putshort(anslen, cp); /* CLASS = UDP payload size */
cp += INT16SZ;
*cp++ = NOERROR; /* extended RCODE */
*cp++ = 0; /* EDNS version */
Home |
Main Index |
Thread Index |
Old Index