Article View: gnu.utils.bug
Article #995(none)
From: Dana Jacobsen
Date: Fri, 02 Oct 1992 19:39
Date: Fri, 02 Oct 1992 19:39
39 lines
1490 bytes
1490 bytes
When paste, from textutils-1.3, is given a null delimiter, it core
dumps on our system (Sun Sparcstation, gcc 2.2.2 -O). This came about
because a user of our system wanted to do "paste -d\\0 f1 f2", but
hadn't read the man pages fully, so tried "paste -d '' f1 f2" which
core dumps. When ucb paste is given a null delimiter, it responds
with "paste: no delimiters", but the following patch makes it run as
if it were told to use a null delimiter (that makes more sense to me).
*** paste.c.orig Thu Jan 16 22:53:10 1992
--- paste.c Fri Oct 2 12:33:46 1992
***************
*** 104,111 ****
{
case 'd':
/* Delimiter character(s). */
! if (optarg[0] == '\0')
! optarg = "\\0";
delims = optarg;
break;
--- 104,113 ----
{
case 'd':
/* Delimiter character(s). */
! if (strlen(optarg) == 0) {
! optarg = (char *) xmalloc(2);
! optarg[0] = EMPTY_DELIM;
! }
delims = optarg;
break;
--
Dana Jacobsen
jacobsd@solar.cor2.epa.gov
jacobsd@cs.orst.edu
Technical Details
Message-ID:
<9210021939.AA11706@solar.cor2.epa.gov>Path:
arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!solar.cor2.epa.gov!jacobsdShow Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!solar.cor2.epa.gov!jacobsd From: jacobsd@solar.cor2.epa.gov (Dana Jacobsen) Subject: (none) Message-ID: <9210021939.AA11706@solar.cor2.epa.gov> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Fri, 2 Oct 1992 19:39:43 GMT Approved: bug-gnu-utils@prep.ai.mit.edu Lines: 40