From pauls@ieng.com Wed Sep 29 17:20:41 1999
Return-Path: <pauls@ieng.com>
Received: from home.ieng.com (home.ieng.com [207.24.215.20])
	by hub.freebsd.org (Postfix) with ESMTP id 181F0151FB
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 29 Sep 1999 17:19:59 -0700 (PDT)
	(envelope-from pauls@ieng.com)
Received: from localhost (pauls@localhost)
	by home.ieng.com (8.9.1a/8.9.1) with SMTP id UAA23311
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 29 Sep 1999 20:19:58 -0400 (EDT)
Message-Id: <Pine.IENG.4.02.9909292015530.23244-100000@home.ieng.com>
Date: Wed, 29 Sep 1999 20:19:58 -0400 (EDT)
From: Paul Southworth <pauls@ieng.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: "host" blows up with incomplete arguments

>Number:         14041
>Category:       bin
>Synopsis:       "host" blows up with incomplete arguments
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    peter
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 29 17:30:01 PDT 1999
>Closed-Date:    Fri Oct 1 07:20:44 PDT 1999
>Last-Modified:  Fri Oct  1 07:28:54 PDT 1999
>Originator:     Paul Southworth
>Release:        FreeBSD 3.3-RELEASE i386
>Organization:
Internet Engineering Group
>Environment:

	FreeBSD 3.3-RELEASE, nothing unusual

>Description:

	If you give the "host" command some flags but nothing
	to query, it dies and dumps core.

>How-To-Repeat:

pauls@deadbeef(11)% host -t any highwing.cdrom.com
highwing.cdrom.com has address 204.216.28.168
highwing.cdrom.com mail is handled (pri=10) by pike.cdrom.com
highwing.cdrom.com mail is handled (pri=5) by zippy.cdrom.com
pauls@deadbeef(12)% host -t any
Segmentation fault (core dumped)


>Fix:
>Release-Note:
>Audit-Trail:

From: Sheldon Hearn <sheldonh@uunet.co.za>
To: Paul Southworth <pauls@ieng.com>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: bin/14041: "host" blows up with incomplete arguments 
Date: Thu, 30 Sep 1999 12:58:42 +0200

 On Wed, 29 Sep 1999 20:19:58 -0400, Paul Southworth wrote:
 
 > 	If you give the "host" command some flags but nothing
 > 	to query, it dies and dumps core.
 
 This is why it should be using getopt. :-)
 
 Ciao,
 Sheldon.
 

From: Ruslan Ermilov <ru@ucb.crimea.ua>
To: Paul Southworth <pauls@ieng.com>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG, bind-bugs@isc.org
Subject: Re: bin/14041: "host" blows up with incomplete arguments
Date: Fri, 1 Oct 1999 16:38:06 +0300

 --FL5UXtIhxfXey3p5
 Content-Type: text/plain; charset=us-ascii
 
 On Wed, Sep 29, 1999 at 08:19:58PM -0400, Paul Southworth wrote:
 > 
 > >Number:         14041
 > >Category:       bin
 > >Synopsis:       "host" blows up with incomplete arguments
 > >Confidential:   no
 > >Severity:       non-critical
 > >Priority:       low
 > >Responsible:    freebsd-bugs
 > >State:          open
 > >Quarter:        
 > >Keywords:       
 > >Date-Required:
 > >Class:          sw-bug
 > >Submitter-Id:   current-users
 > >Arrival-Date:   Wed Sep 29 17:30:01 PDT 1999
 > >Closed-Date:
 > >Last-Modified:
 > >Originator:     Paul Southworth
 > >Release:        FreeBSD 3.3-RELEASE i386
 > >Organization:
 > Internet Engineering Group
 > >Environment:
 > 
 > 	FreeBSD 3.3-RELEASE, nothing unusual
 > 
 > >Description:
 > 
 > 	If you give the "host" command some flags but nothing
 > 	to query, it dies and dumps core.
 > 
 > >How-To-Repeat:
 > 
 > pauls@deadbeef(11)% host -t any highwing.cdrom.com
 > highwing.cdrom.com has address 204.216.28.168
 > highwing.cdrom.com mail is handled (pri=10) by pike.cdrom.com
 > highwing.cdrom.com mail is handled (pri=5) by zippy.cdrom.com
 > pauls@deadbeef(12)% host -t any
 > Segmentation fault (core dumped)
 > 
 The attached patch fixes the problem.
 
 -- 
 Ruslan Ermilov		Sysadmin and DBA of the
 ru@ucb.crimea.ua	United Commercial Bank,
 ru@FreeBSD.org		FreeBSD committer,
 +380.652.247.647	Simferopol, Ukraine
 
 http://www.FreeBSD.org	The Power To Serve
 http://www.oracle.com	Enabling The Information Age
 
 --FL5UXtIhxfXey3p5
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="host.c.patch"
 
 Index: host.c
 ===================================================================
 RCS file: /usr/FreeBSD-CVS/src/contrib/bind/bin/host/host.c,v
 retrieving revision 1.1.1.1
 diff -u -r1.1.1.1 host.c
 --- host.c	1998/05/03 04:09:49	1.1.1.1
 +++ host.c	1999/10/01 12:32:39
 @@ -175,10 +175,6 @@
  	res_init();
  	_res.retrans = 5;
  
 -	if (c < 2) {
 -		fprintf(stderr, "Usage: host [-w] [-v] [-r] [-d] [-t querytype] [-c class] [-a] host [server]\n  -w to wait forever until reply\n  -v for verbose output\n  -r to disable recursive processing\n  -d to turn on debugging output\n  -t querytype to look for a specific type of information\n  -c class to look for non-Internet data\n  -a is equivalent to '-v -t *'\n");
 -		exit(1);
 -	}
  	while (c > 2 && v[1][0] == '-') {
  		if (strcmp (v[1], "-w") == 0) {
  			_res.retry = 1;
 @@ -228,6 +224,10 @@
  			c--;
  		}		
          }
 +	if (c < 2) {
 +		fprintf(stderr, "Usage: host [-w] [-v] [-r] [-d] [-t querytype] [-c class] [-a] host [server]\n  -w to wait forever until reply\n  -v for verbose output\n  -r to disable recursive processing\n  -d to turn on debugging output\n  -t querytype to look for a specific type of information\n  -c class to look for non-Internet data\n  -a is equivalent to '-v -t *'\n");
 +		exit(1);
 +	}
  	if (c > 2) {
  		s = v[2];
  		server_specified++;
 
 --FL5UXtIhxfXey3p5--
 

From: marka@isc.org
To: Ruslan Ermilov <ru@ucb.crimea.ua>
Cc: Paul Southworth <pauls@ieng.com>,
	FreeBSD-gnats-submit@freebsd.org, bind-bugs@isc.org
Subject: Re: bin/14041: "host" blows up with incomplete arguments 
Date: Fri, 01 Oct 1999 23:59:20 +1000

 	This was fixed in BIND 8.2.
 
 	Mark
 
 > 
 > --FL5UXtIhxfXey3p5
 > Content-Type: text/plain; charset=us-ascii
 > 
 > On Wed, Sep 29, 1999 at 08:19:58PM -0400, Paul Southworth wrote:
 > > 
 > > >Number:         14041
 > > >Category:       bin
 > > >Synopsis:       "host" blows up with incomplete arguments
 > > >Confidential:   no
 > > >Severity:       non-critical
 > > >Priority:       low
 > > >Responsible:    freebsd-bugs
 > > >State:          open
 > > >Quarter:        
 > > >Keywords:       
 > > >Date-Required:
 > > >Class:          sw-bug
 > > >Submitter-Id:   current-users
 > > >Arrival-Date:   Wed Sep 29 17:30:01 PDT 1999
 > > >Closed-Date:
 > > >Last-Modified:
 > > >Originator:     Paul Southworth
 > > >Release:        FreeBSD 3.3-RELEASE i386
 > > >Organization:
 > > Internet Engineering Group
 > > >Environment:
 > > 
 > > 	FreeBSD 3.3-RELEASE, nothing unusual
 > > 
 > > >Description:
 > > 
 > > 	If you give the "host" command some flags but nothing
 > > 	to query, it dies and dumps core.
 > > 
 > > >How-To-Repeat:
 > > 
 > > pauls@deadbeef(11)% host -t any highwing.cdrom.com
 > > highwing.cdrom.com has address 204.216.28.168
 > > highwing.cdrom.com mail is handled (pri=10) by pike.cdrom.com
 > > highwing.cdrom.com mail is handled (pri=5) by zippy.cdrom.com
 > > pauls@deadbeef(12)% host -t any
 > > Segmentation fault (core dumped)
 > > 
 > The attached patch fixes the problem.
 > 
 > -- 
 > Ruslan Ermilov		Sysadmin and DBA of the
 > ru@ucb.crimea.ua	United Commercial Bank,
 > ru@FreeBSD.org		FreeBSD committer,
 > +380.652.247.647	Simferopol, Ukraine
 > 
 > http://www.FreeBSD.org	The Power To Serve
 > http://www.oracle.com	Enabling The Information Age
 > 
 > --FL5UXtIhxfXey3p5
 > Content-Type: text/plain; charset=us-ascii
 > Content-Disposition: attachment; filename="host.c.patch"
 > 
 > Index: host.c
 > ===================================================================
 > RCS file: /usr/FreeBSD-CVS/src/contrib/bind/bin/host/host.c,v
 > retrieving revision 1.1.1.1
 > diff -u -r1.1.1.1 host.c
 > --- host.c	1998/05/03 04:09:49	1.1.1.1
 > +++ host.c	1999/10/01 12:32:39
 > @@ -175,10 +175,6 @@
 >  	res_init();
 >  	_res.retrans = 5;
 >  
 > -	if (c < 2) {
 > -		fprintf(stderr, "Usage: host [-w] [-v] [-r] [-d] [-t querytype]
 >  [-c class] [-a] host [server]\n  -w to wait forever until reply\n  -v for ve
 > rbose output\n  -r to disable recursive processing\n  -d to turn on debugging
 >  output\n  -t querytype to look for a specific type of information\n  -c clas
 > s to look for non-Internet data\n  -a is equivalent to '-v -t *'\n");
 > -		exit(1);
 > -	}
 >  	while (c > 2 && v[1][0] == '-') {
 >  		if (strcmp (v[1], "-w") == 0) {
 >  			_res.retry = 1;
 > @@ -228,6 +224,10 @@
 >  			c--;
 >  		}		
 >          }
 > +	if (c < 2) {
 > +		fprintf(stderr, "Usage: host [-w] [-v] [-r] [-d] [-t querytype]
 >  [-c class] [-a] host [server]\n  -w to wait forever until reply\n  -v for ve
 > rbose output\n  -r to disable recursive processing\n  -d to turn on debugging
 >  output\n  -t querytype to look for a specific type of information\n  -c clas
 > s to look for non-Internet data\n  -a is equivalent to '-v -t *'\n");
 > +		exit(1);
 > +	}
 >  	if (c > 2) {
 >  		s = v[2];
 >  		server_specified++;
 > 
 > --FL5UXtIhxfXey3p5--
 --
 Mark Andrews, Internet Software Consortium
 1 Seymour St., Dundas Valley, NSW 2117, Australia
 PHONE: +61 2 9871 4742                 INTERNET: marka@isc.org
 
State-Changed-From-To: open->closed 
State-Changed-By: ru 
State-Changed-When: Fri Oct 1 07:20:44 PDT 1999 
State-Changed-Why:  
Mark Andrews <marka@isc.org> reports that the problem has been 
fixed in BIND 8.2, so this PR is superseded by PR misc/13837. 


Responsible-Changed-From-To: freebsd-bugs->peter 
Responsible-Changed-By: ru 
Responsible-Changed-When: Fri Oct 1 07:20:44 PDT 1999 
Responsible-Changed-Why:  
Just to let Peter know :-) 
>Unformatted:
