Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Oct 1999 06:50:02 -0700 (PDT)
From:      Ruslan Ermilov <ru@ucb.crimea.ua>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/14041: "host" blows up with incomplete arguments
Message-ID:  <199910011350.GAA65345@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/14041; it has been noted by GNATS.

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--
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910011350.GAA65345>