summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authoritojun <itojun>2003-07-17 08:56:35 +0000
committeritojun <itojun>2003-07-17 08:56:35 +0000
commit36bb6bb2a58fb357ab84319b3836a4ee2154776a (patch)
tree4bb79e7f74fd61ace3ffbf924b17a7a691b09a8f /net
parent508e1e24362847f5fac5bfec494a3ffb49608cf8 (diff)
downloadpkgsrc-36bb6bb2a58fb357ab84319b3836a4ee2154776a.tar.gz
correct response to long query. http://www.nlnetlabs.nl/bugs/show_bug.cgi?id=59
Diffstat (limited to 'net')
-rw-r--r--net/nsd/distinfo3
-rw-r--r--net/nsd/patches/patch-aa22
2 files changed, 24 insertions, 1 deletions
diff --git a/net/nsd/distinfo b/net/nsd/distinfo
index f3828d0a55b..4dbee65740d 100644
--- a/net/nsd/distinfo
+++ b/net/nsd/distinfo
@@ -1,4 +1,5 @@
-$NetBSD: distinfo,v 1.9 2003/07/17 08:52:46 itojun Exp $
+$NetBSD: distinfo,v 1.10 2003/07/17 08:56:35 itojun Exp $
SHA1 (nsd-1.2.1.tar.gz) = 3fde16082d5c3b67a2c6f774374a60cdf39ec6e9
Size (nsd-1.2.1.tar.gz) = 138427 bytes
+SHA1 (patch-aa) = 0e5c27b668edf2868b4604512841c414ec267f61
diff --git a/net/nsd/patches/patch-aa b/net/nsd/patches/patch-aa
new file mode 100644
index 00000000000..c318861c4f7
--- /dev/null
+++ b/net/nsd/patches/patch-aa
@@ -0,0 +1,22 @@
+$NetBSD: patch-aa,v 1.6 2003/07/17 08:56:35 itojun Exp $
+
+Index: query.c
+===================================================================
+RCS file: /cvs/nsd/query.c,v
+retrieving revision 1.125
+diff -u -r1.125 query.c
+--- query.c 7 Jul 2003 12:59:37 -0000 1.125
++++ query.c 17 Jul 2003 08:46:26 -0000
+@@ -356,8 +356,10 @@
+ * in question dname or the domain name is longer than
+ * MAXDOMAINLEN ...
+ */
+- if ((*src & 0xc0) || (src + *src > query->iobufptr) ||
+- ((src - query->iobuf + *src) > MAXDOMAINLEN)) {
++ if ((*src & 0xc0) ||
++ (src + *src + 1 > query->iobufptr) ||
++ (src + *src + 1 > query_name + MAXDOMAINLEN))
++ {
+ query_formerr(query);
+ return NULL;
+ }