summaryrefslogtreecommitdiff
path: root/usr.sbin/named/libresolv
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>2001-01-28 02:12:51 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>2001-01-28 02:12:51 +0000
commitcf2a17657eb441eef3b71b1ac30e56c6ae621cda (patch)
treefee811b0a957eef265eef163958faa684135b0e4 /usr.sbin/named/libresolv
parentd6f809cf2bf1dc061c81a88f9fcabc8eceaf1c73 (diff)
BIND 4.9.8-REL merge
Diffstat (limited to 'usr.sbin/named/libresolv')
-rw-r--r--usr.sbin/named/libresolv/res_comp.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/usr.sbin/named/libresolv/res_comp.c b/usr.sbin/named/libresolv/res_comp.c
index d9b7d3323eb..132f99f3b55 100644
--- a/usr.sbin/named/libresolv/res_comp.c
+++ b/usr.sbin/named/libresolv/res_comp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: res_comp.c,v 1.3 1998/05/22 07:09:08 millert Exp $ */
+/* $OpenBSD: res_comp.c,v 1.4 2001/01/28 02:12:49 niklas Exp $ */
/*
* ++Copyright++ 1985, 1993
@@ -60,7 +60,7 @@
static char sccsid[] = "@(#)res_comp.c 8.1 (Berkeley) 6/4/93";
static char rcsid[] = "$From: res_comp.c,v 8.14 1998/05/11 04:19:47 vixie Exp $";
#else
-static char rcsid[] = "$OpenBSD: res_comp.c,v 1.3 1998/05/22 07:09:08 millert Exp $";
+static char rcsid[] = "$OpenBSD: res_comp.c,v 1.4 2001/01/28 02:12:49 niklas Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -804,6 +804,25 @@ ns_name_compress(src, dst, dstsiz, dnptrs, lastdnptr)
}
/*
+ * Reset dnptrs so that there are no active references to pointers at or
+ * after src.
+ */
+void
+ns_name_rollback(src, dnptrs, lastdnptr)
+ const u_char *src;
+ const u_char **dnptrs;
+ const u_char **lastdnptr;
+{
+ while (dnptrs < lastdnptr && *dnptrs != NULL) {
+ if (*dnptrs >= src) {
+ *dnptrs = NULL;
+ break;
+ }
+ dnptrs++;
+ }
+}
+
+/*
* ns_name_skip(ptrptr, eom)
* Advance *ptrptr to skip over the compressed name it points at.
* return: