diff --context --recurs m:\bind497t1/CHANGES m:\bind497rel/CHANGES
*** m:\bind497t1/CHANGES	Tue Apr 07 04:59:42 1998
--- m:\bind497rel/CHANGES	Mon May 11 04:19:40 1998
***************
*** 1,6 ****
! $Id: CHANGES,v 8.56 1998/04/07 04:59:42 vixie Exp $
! 
! 	--- 4.9.7-T1A released ---
  
  808. [security]	A number of routines did insufficient bounds checking which
  		could cause crashes by reading from an invalid memory
--- 1,19 ----
! $Id: CHANGES,v 8.57 1998/05/11 04:19:41 vixie Exp $
! 
! 	--- 4.9.7-REL released ---
! 
! 812. [port]	minor lint fixed in named/ns_req.c.  (js)
! 
! 811. [bug]	memory was leaked if the first line of a zone file had a
! 		syntax error.  (marka)
! 
! 810. [port]	res/res_comp.c's import of BIND-8 code included ANSI function
! 		headers, which were not required in BIND-4, so were removed.
! 
! 809. [security]	The server was creating files in a world writable directory
! 		while running as root.  Import fix from BIND-8.  (marka)
! 
! 	--- 4.9.7-T1B released ---
  
  808. [security]	A number of routines did insufficient bounds checking which
  		could cause crashes by reading from an invalid memory
diff --context --recurs m:\bind497t1/Makefile m:\bind497rel/Makefile
*** m:\bind497t1/Makefile	Tue Apr 07 04:59:42 1998
--- m:\bind497rel/Makefile	Mon May 11 04:19:42 1998
***************
*** 1,16 ****
  # Makefile for BIND>=4.9 top level
  # vixie@decwrl December, 1992 [original]
  #
! # $Id: Makefile,v 8.52 1998/04/07 04:59:42 vixie Exp $
  
! ## Copyright (c) 1989
! ##    The Regents of the University of California.  All rights reserved.
  ## 
! ## Redistribution and use in source and binary forms, with or without
! ## modification, are permitted provided that the following conditions
! ## are met:
! ## 1. Redistributions of source code must retain the above copyright
! ##    notice, this list of conditions and the following disclaimer.
  ## 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.
--- 1,16 ----
  # Makefile for BIND>=4.9 top level
  # vixie@decwrl December, 1992 [original]
  #
! # $Id: Makefile,v 8.53 1998/05/11 04:19:41 vixie Exp $
  
! ## Copyright (c) 1989
! ##    The Regents of the University of California.  All rights reserved.
  ## 
! ## Redistribution and use in source and binary forms, with or without
! ## modification, are permitted provided that the following conditions
! ## are met:
! ## 1. Redistributions of source code must retain the above copyright
! ##    notice, this list of conditions and the following disclaimer.
  ## 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.
***************
*** 52,58 ****
  ## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  ## SOFTWARE.
  
! VER = 4.9.7-T1B
  SHELL = /bin/sh
  MAKE = make
  DESTDIR =
--- 52,58 ----
  ## ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  ## SOFTWARE.
  
! VER = 4.9.7-REL
  SHELL = /bin/sh
  MAKE = make
  DESTDIR =
Only in m:\bind497rel: bind-4.9.7-REL.tar
Only in m:\bind497rel: bind-4.9.7-REL.tar.gz
Only in m:\bind497t1: bind-4.9.7-T1B.tar
diff --context --recurs m:\bind497t1/conf/options.h m:\bind497rel/conf/options.h
*** m:\bind497t1/conf/options.h	Mon Nov 11 06:36:42 1996
--- m:\bind497rel/conf/options.h	Tue Apr 21 22:45:18 1998
***************
*** 115,121 ****
  #define PURGE_ZONE	/* remove all traces of a zone when reloading (mpa) */
  #define STATS		/* keep nameserver statistics; uses more memory */
  #define RENICE  	/* named-xfer should run at normal priority */
! /*#define XSTATS	/* extended statistics, syslogged periodically (bg) */
  /*#define BIND_NOTIFY	/* experimental - do not enable in customer products */
  #define LOC_RR		/* support for LOC record parsing (ckd/vix) */
  #define SORT_RESPONSE	/* should we try to sort responses optimally? (vix) */
--- 115,121 ----
  #define PURGE_ZONE	/* remove all traces of a zone when reloading (mpa) */
  #define STATS		/* keep nameserver statistics; uses more memory */
  #define RENICE  	/* named-xfer should run at normal priority */
! #define XSTATS	/* extended statistics, syslogged periodically (bg) */
  /*#define BIND_NOTIFY	/* experimental - do not enable in customer products */
  #define LOC_RR		/* support for LOC record parsing (ckd/vix) */
  #define SORT_RESPONSE	/* should we try to sort responses optimally? (vix) */
diff --context --recurs m:\bind497t1/doc/bog/file.psf m:\bind497rel/doc/bog/file.psf
*** m:\bind497t1/doc/bog/file.psf	Tue Apr 07 05:02:10 1998
--- m:\bind497rel/doc/bog/file.psf	Mon May 11 04:26:18 1998
***************
*** 1,6 ****
  %!PS-Adobe-3.0
  %%Creator: groff version 1.10
! %%CreationDate: Mon Apr  6 22:02:10 1998
  %%DocumentNeededResources: font Times-Bold
  %%+ font Times-Italic
  %%+ font Times-Roman
--- 1,6 ----
  %!PS-Adobe-3.0
  %%Creator: groff version 1.10
! %%CreationDate: Sun May 10 21:26:18 1998
  %%DocumentNeededResources: font Times-Bold
  %%+ font Times-Italic
  %%+ font Times-Roman
diff --context --recurs m:\bind497t1/named/db_load.c m:\bind497rel/named/db_load.c
*** m:\bind497t1/named/db_load.c	Sun Jun 01 20:34:34 1997
--- m:\bind497rel/named/db_load.c	Mon May 11 04:19:46 1998
***************
*** 1,15 ****
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)db_load.c	4.38 (Berkeley) 3/2/91";
! static char rcsid[] = "$Id: db_load.c,v 8.32 1997/06/01 20:34:34 vixie Exp $";
! #endif /* not lint */
  
  /*
!  * ++Copyright++ 1986, 1988, 1990
   * -
!  * Copyright (c) 1986, 1988, 1990
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
--- 1,15 ----
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)db_load.c	4.38 (Berkeley) 3/2/91";
! static char rcsid[] = "$Id: db_load.c,v 8.33 1998/05/11 04:19:45 vixie Exp $";
! #endif /* not lint */
  
  /*
!  * ++Copyright++ 1986, 1988, 1990
   * -
!  * Copyright (c) 1986, 1988, 1990
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
***************
*** 1370,1375 ****
--- 1370,1376 ----
  			continue;
  
  		case ERROR:
+ 			SETERR("parser error");
  			break;
  		}
   err:
diff --context --recurs m:\bind497t1/named/ns_init.c m:\bind497rel/named/ns_init.c
*** m:\bind497t1/named/ns_init.c	Sun Jun 01 20:34:34 1997
--- m:\bind497rel/named/ns_init.c	Mon May 11 04:19:46 1998
***************
*** 1,15 ****
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)ns_init.c	4.38 (Berkeley) 3/21/91";
! static char rcsid[] = "$Id: ns_init.c,v 8.25 1997/06/01 20:34:34 vixie Exp $";
! #endif /* not lint */
  
  /*
!  * ++Copyright++ 1986, 1990
   * -
!  * Copyright (c) 1986, 1990
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
--- 1,15 ----
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)ns_init.c	4.38 (Berkeley) 3/21/91";
! static char rcsid[] = "$Id: ns_init.c,v 8.26 1998/05/11 04:19:45 vixie Exp $";
! #endif /* not lint */
  
  /*
!  * ++Copyright++ 1986, 1990
   * -
!  * Copyright (c) 1986, 1990
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
***************
*** 560,567 ****
  				 * We will always transfer this zone again
  				 * after a reload.
  				 */
! 				sprintf(buf, "%s/NsTmp%ld.%d", _PATH_TMPDIR,
! 					(long)getpid(), tmpnum++);
  				source = savestr(buf);
  				zp->z_flags |= Z_TMP_FILE;
  			} else
--- 560,567 ----
  				 * We will always transfer this zone again
  				 * after a reload.
  				 */
! 				sprintf(buf, "NsTmp%ld.%d", (long)getpid(),
! 					tmpnum++);
  				source = savestr(buf);
  				zp->z_flags |= Z_TMP_FILE;
  			} else
diff --context --recurs m:\bind497t1/named/ns_main.c m:\bind497rel/named/ns_main.c
*** m:\bind497t1/named/ns_main.c	Sun Jun 01 20:34:36 1997
--- m:\bind497rel/named/ns_main.c	Mon May 11 04:19:46 1998
***************
*** 1,15 ****
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)ns_main.c	4.55 (Berkeley) 7/1/91";
! static char rcsid[] = "$Id: ns_main.c,v 8.25 1997/06/01 20:34:34 vixie Exp $";
  #endif /* not lint */
  
  /*
!  * ++Copyright++ 1986, 1989, 1990
   * -
!  * Copyright (c) 1986, 1989, 1990
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
--- 1,15 ----
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)ns_main.c	4.55 (Berkeley) 7/1/91";
! static char rcsid[] = "$Id: ns_main.c,v 8.26 1998/05/11 04:19:45 vixie Exp $";
  #endif /* not lint */
  
  /*
!  * ++Copyright++ 1986, 1989, 1990
   * -
!  * Copyright (c) 1986, 1989, 1990
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
***************
*** 1463,1469 ****
  	dprintf(1, (ddt, "sigprof()\n"));
  	if (fork() == 0)
  	{
- 		(void) chdir(_PATH_TMPDIR);
  		exit(1);
  	}
  	errno = save_errno;
--- 1463,1468 ----
diff --context --recurs m:\bind497t1/named/ns_req.c m:\bind497rel/named/ns_req.c
*** m:\bind497t1/named/ns_req.c	Tue Apr 07 04:59:46 1998
--- m:\bind497rel/named/ns_req.c	Mon May 11 04:19:46 1998
***************
*** 1,15 ****
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)ns_req.c	4.47 (Berkeley) 7/1/91";
! static char rcsid[] = "$Id: ns_req.c,v 8.29 1998/04/07 04:59:45 vixie Exp $";
! #endif /* not lint */
  
  /*
!  * ++Copyright++ 1986, 1988, 1990
   * -
!  * Copyright (c) 1986, 1988, 1990
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
--- 1,15 ----
  #if !defined(lint) && !defined(SABER)
  static char sccsid[] = "@(#)ns_req.c	4.47 (Berkeley) 7/1/91";
! static char rcsid[] = "$Id: ns_req.c,v 8.30 1998/05/11 04:19:45 vixie Exp $";
! #endif /* not lint */
  
  /*
!  * ++Copyright++ 1986, 1988, 1990
   * -
!  * Copyright (c) 1986, 1988, 1990
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
***************
*** 1081,1087 ****
  					return (Finish);
  				}
  				*cpp += n;
! 				if (*cpp + 2 * INT16SZ > dnbuf + *buflenp) {
  					hp->tc = 1;
  					return (Finish);
  				}
--- 1081,1088 ----
  					return (Finish);
  				}
  				*cpp += n;
! 				if (*cpp + 2 * INT16SZ > 
! 				    (u_char *)dnbuf + *buflenp) {
  					hp->tc = 1;
  					return (Finish);
  				}
diff --context --recurs m:\bind497t1/named/pathnames.h m:\bind497rel/named/pathnames.h
*** m:\bind497t1/named/pathnames.h	Thu Dec 15 06:24:22 1994
--- m:\bind497rel/named/pathnames.h	Mon May 11 04:19:46 1998
***************
*** 1,15 ****
  /*
   *	@(#)pathnames.h	5.4 (Berkeley) 6/1/90
!  *	$Id: pathnames.h,v 8.1 1994/12/15 06:24:14 vixie Exp $
   */
  
! /*
!  * ++Copyright++ 1989
   * -
!  * Copyright (c) 1989
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
--- 1,15 ----
  /*
   *	@(#)pathnames.h	5.4 (Berkeley) 6/1/90
!  *	$Id: pathnames.h,v 8.2 1998/05/11 04:19:45 vixie Exp $
   */
  
! /*
!  * ++Copyright++ 1989
   * -
!  * Copyright (c) 1989
!  *    The Regents of the University of California.  All rights reserved.
   * 
!  * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
***************
*** 74,88 ****
  #ifndef _PATH_XFER
  # define _PATH_XFER	"/usr/libexec/named-xfer"
  #endif
! #define	_PATH_DEBUG	"/var/tmp/named.run"
! #define	_PATH_DUMPFILE	"/var/tmp/named_dump.db"
  #ifndef _PATH_PIDFILE
  # define _PATH_PIDFILE	"/var/run/named.pid"
  #endif
! #define	_PATH_STATS	"/var/tmp/named.stats"
! #define	_PATH_XFERTRACE	"/var/tmp/xfer.trace"
! #define _PATH_XFERDDT	"/var/tmp/xfer.ddt"
! #define	_PATH_TMPXFER	"/var/tmp/xfer.ddt.XXXXXX"
  #define	_PATH_TMPDIR	"/var/tmp"
  
  #else /* BSD */
--- 74,88 ----
  #ifndef _PATH_XFER
  # define _PATH_XFER	"/usr/libexec/named-xfer"
  #endif
! #define	_PATH_DEBUG	"named.run"
! #define	_PATH_DUMPFILE	"named_dump.db"
  #ifndef _PATH_PIDFILE
  # define _PATH_PIDFILE	"/var/run/named.pid"
  #endif
! #define	_PATH_STATS	"named.stats"
! #define	_PATH_XFERTRACE	"xfer.trace"
! #define _PATH_XFERDDT	"xfer.ddt"
! #define	_PATH_TMPXFER	"xfer.ddt.XXXXXX"
  #define	_PATH_TMPDIR	"/var/tmp"
  
  #else /* BSD */
***************
*** 92,106 ****
  #ifndef _PATH_XFER
  # define _PATH_XFER	"/etc/named-xfer"
  #endif
! #define	_PATH_DEBUG	"/usr/tmp/named.run"
! #define	_PATH_DUMPFILE	"/usr/tmp/named_dump.db"
  #ifndef _PATH_PIDFILE
  # define _PATH_PIDFILE	"/etc/named.pid"
  #endif
! #define	_PATH_STATS	"/usr/tmp/named.stats"
! #define	_PATH_XFERTRACE	"/usr/tmp/xfer.trace"
! #define _PATH_XFERDDT	"/usr/tmp/xfer.ddt"
! #define	_PATH_TMPXFER	"/usr/tmp/xfer.ddt.XXXXXX"
  #define	_PATH_TMPDIR	"/usr/tmp"
  #endif /* BSD */
  
--- 92,106 ----
  #ifndef _PATH_XFER
  # define _PATH_XFER	"/etc/named-xfer"
  #endif
! #define	_PATH_DEBUG	"named.run"
! #define	_PATH_DUMPFILE	"named_dump.db"
  #ifndef _PATH_PIDFILE
  # define _PATH_PIDFILE	"/etc/named.pid"
  #endif
! #define	_PATH_STATS	"named.stats"
! #define	_PATH_XFERTRACE	"xfer.trace"
! #define _PATH_XFERDDT	"xfer.ddt"
! #define	_PATH_TMPXFER	"xfer.ddt.XXXXXX"
  #define	_PATH_TMPDIR	"/usr/tmp"
  #endif /* BSD */
  
diff --context --recurs m:\bind497t1/res/res_comp.c m:\bind497rel/res/res_comp.c
*** m:\bind497t1/res/res_comp.c	Tue Apr 07 04:24:06 1998
--- m:\bind497rel/res/res_comp.c	Mon May 11 04:19:46 1998
***************
*** 55,70 ****
  
  #if defined(LIBC_SCCS) && !defined(lint)
  static char sccsid[] = "@(#)res_comp.c	8.1 (Berkeley) 6/4/93";
! static char rcsid[] = "$Id: res_comp.c,v 8.13 1998/04/07 04:24:06 vixie Exp $";
! #endif /* LIBC_SCCS and not lint */
  
! #include <sys/types.h>
! #include <sys/param.h>
! #include <netinet/in.h>
! #include <arpa/nameser.h>
  
! #include <ctype.h>
! #include <errno.h>
  #include <resolv.h>
  #include <stdio.h>
  
--- 55,70 ----
  
  #if defined(LIBC_SCCS) && !defined(lint)
  static char sccsid[] = "@(#)res_comp.c	8.1 (Berkeley) 6/4/93";
! static char rcsid[] = "$Id: res_comp.c,v 8.14 1998/05/11 04:19:47 vixie Exp $";
! #endif /* LIBC_SCCS and not lint */
  
! #include <sys/types.h>
! #include <sys/param.h>
! #include <netinet/in.h>
! #include <arpa/nameser.h>
  
! #include <ctype.h>
! #include <errno.h>
  #include <resolv.h>
  #include <stdio.h>
  
***************
*** 95,102 ****
   * Return size of compressed name or -1 if there was an error.
   */
  int
! dn_expand(const u_char *msg, const u_char *eom, const u_char *src,
! 	  char *dst, int dstsiz)
  {
  	int n = ns_name_uncompress(msg, eom, src, dst, (size_t)dstsiz);
  
--- 95,106 ----
   * Return size of compressed name or -1 if there was an error.
   */
  int
! dn_expand(msg, eom, src, dst, dstsiz)
! 	const u_char *msg;
! 	const u_char *eom;
! 	const u_char *src;
! 	char *dst;
! 	int dstsiz;
  {
  	int n = ns_name_uncompress(msg, eom, src, dst, (size_t)dstsiz);
  
***************
*** 111,118 ****
   * 'length' is the size of the array pointed to by 'comp_dn'.
   */
  int
! dn_comp(const char *src, u_char *dst, int dstsiz,
! 	u_char **dnptrs, u_char **lastdnptr)
  {
  	return (ns_name_compress(src, dst, (size_t)dstsiz,
  				 (const u_char **)dnptrs,
--- 115,126 ----
   * 'length' is the size of the array pointed to by 'comp_dn'.
   */
  int
! dn_comp(src, dst, dstsiz, dnptrs, lastdnptr)
! 	const char *src;
! 	u_char *dst;
! 	int dstsiz;
! 	u_char **dnptrs;
! 	u_char **lastdnptr;
  {
  	return (ns_name_compress(src, dst, (size_t)dstsiz,
  				 (const u_char **)dnptrs,
***************
*** 123,129 ****
   * Skip over a compressed domain name. Return the size or -1.
   */
  int
! __dn_skipname(const u_char *ptr, const u_char *eom) {
  	const u_char *saveptr = ptr;
  
  	if (ns_name_skip(&ptr, eom) == -1)
--- 131,140 ----
   * Skip over a compressed domain name. Return the size or -1.
   */
  int
! __dn_skipname(ptr, eom)
! 	const u_char *ptr;
! 	const u_char *eom;
! {
  	const u_char *saveptr = ptr;
  
  	if (ns_name_skip(&ptr, eom) == -1)
