From zgabor@code.hu  Fri May 24 05:23:28 1996
Received: from mail.EUnet.hu (mail.eunet.hu [193.225.28.100])
          by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id FAA25223
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 24 May 1996 05:23:20 -0700 (PDT)
Received: by mail.EUnet.hu, id OAA16078; Fri, 24 May 1996 14:23:11 +0200
Received: from zg.CoDe.hu by CoDe.CoDe.hu (OAA02648); Fri, 24 May 1996 14:04:14 GMT
Received: (from zgabor@localhost) by zg.CoDe.hu (8.6.12/8.6.12) id OAA00275; Fri, 24 May 1996 14:15:22 +0200
Message-Id: <199605241215.OAA00275@zg.CoDe.hu>
Date: Fri, 24 May 1996 14:15:22 +0200
From: Zahemszky Gabor <zgabor@code.hu>
Reply-To: zgabor@code.hu
To: FreeBSD-gnats-submit@freebsd.org
Subject: ``jot(1)'' dumps core
X-Send-Pr-Version: 3.2

>Number:         1241
>Category:       bin
>Synopsis:       The jot(1) command with -s (FROM 2.1.0 CD) generates core dump
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 24 05:30:02 PDT 1996
>Closed-Date:    Wed Aug 28 19:47:47 PDT 1996
>Last-Modified:  Tue Nov 27 18:53:12 PST 2001
>Originator:     Zahemszky Gabor <zgabor@CoDe.hu>
>Release:        FreeBSD 2.1.0-RELEASE i386
>Organization:
>Environment:

	FreeBSD 2.1.0-RELEASE from Walnut Creek CD.

>Description:

	The jot(1) command, found on a 2.1.0-RELEASE CD from Walnut Creek,
	generates a core dump, if called with the ``-s'' option.

>How-To-Repeat:

	Any jot command with -s option.
	Eg: jot -s ' ' /etc/passwd /etc/passwd

>Fix:
	
	Here is the fixing patch:
*** jot.c.orig	Fri May 24 14:05:58 1996
--- jot.c	Fri May 24 14:08:38 1996
***************
*** 140,150 ****
  			break;
  		case 's':
  			if ((*av)[2])
! 				strcpy(sepstring, *av + 2);
  			else if (!--ac)
  				error("Need string after -s", "");
  			else
! 				strcpy(sepstring, *++av);
  			break;
  		case 'p':
  			if ((*av)[2])
--- 140,150 ----
  			break;
  		case 's':
  			if ((*av)[2])
! 				sepstring = *av + 2;
  			else if (!--ac)
  				error("Need string after -s", "");
  			else
! 				sepstring = *++av;
  			break;
  		case 'p':
  			if ((*av)[2])


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: jkh 
State-Changed-When: Wed Aug 28 19:47:47 PDT 1996 
State-Changed-Why:  
I can't reproduce this bug in -current; it must be fixed. 
>Unformatted:
