Subject: bin/14338: rs -z segfaults
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jarle@uninett.no>
List: netbsd-bugs
Date: 10/24/2001 11:34:34
>Number: 14338
>Category: bin
>Synopsis: rs -z segfaults
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Oct 24 02:35:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Jarle Greipsland
>Release: 2001-06-06
>Organization:
UNINETT
>Environment:
System: NetBSD festningen.uninett.no 1.5.1_BETA2 NetBSD 1.5.1_BETA2 (FESTNINGEN) #2: Thu Jun 7 18:01:40 CEST 2001 root@festningen.uninett.no:/usr/src/sys/arch/i386/compile/FESTNINGEN i386
>Description:
The /usr/bin/rs -z switch (do column width adaption) causes rs to
segfault.
>How-To-Repeat:
$ echo text | rs -z
>Fix:
Apply patch:
*** rs.c.orig Wed Oct 24 11:31:53 2001
--- rs.c Wed Oct 24 11:17:37 2001
***************
*** 311,315 ****
}
else
! for (i = 0; i < ocols; i++) {
for (j = i; j < nelem; j += ocols)
if ((n = strlen(ep[j])) > max)
--- 311,315 ----
}
else
! for (ep = elem, i = 0; i < ocols; i++) {
for (j = i; j < nelem; j += ocols)
if ((n = strlen(ep[j])) > max)
>Release-Note:
>Audit-Trail:
>Unformatted: