Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Mar 2002 13:42:43 +1100 (EST)
From:      "Tim J. Robbins" <tim@robbins.dropbear.id.au>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   standards/36074: paste(1) should not accept no arguments
Message-ID:  <200203190242.g2J2ghC00736@descent.robbins.dropbear.id.au>

next in thread | raw e-mail | index | archive | help

>Number:         36074
>Category:       standards
>Synopsis:       paste(1) should not accept no arguments
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-standards
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 18 18:50:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Tim J. Robbins
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
>Environment:
System: FreeBSD descent.robbins.dropbear.id.au 4.5-STABLE FreeBSD 4.5-STABLE #8: Tue Mar 19 08:46:39 EST 2002 tim@descent.robbins.dropbear.id.au:/usr/obj/usr/src/sys/DESCENT i386


	
>Description:
When invoked with no arguments, paste(1) does nothing instead of
giving a usage error message, like its usage and SYNOPSIS would indicate,
as well as the standard.

>How-To-Repeat:
paste
>Fix:

Index: paste/paste.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/paste/paste.c,v
retrieving revision 1.6
diff -u -r1.6 paste.c
--- paste/paste.c	1999/08/28 01:04:53	1.6
+++ paste/paste.c	2002/03/02 17:40:30
@@ -88,6 +88,9 @@
 	argc -= optind;
 	argv += optind;
 
+	if (*argv == NULL)
+		usage();
+
 	if (!delim) {
 		delimcnt = 1;
 		delim = "\t";
>Release-Note:
>Audit-Trail:
>Unformatted:

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




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