Bug 28210 - man /bin/echo generates a segfault with groff
Summary: man /bin/echo generates a segfault with groff
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: groff   
(Show other bugs)
Version: 6.2
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Florian La Roche
QA Contact: Aaron Brown
URL:
Whiteboard:
Keywords: Security
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-02-18 07:51 UTC by Pekka Savola
Modified: 2007-04-18 16:31 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-03-06 13:15:25 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Pekka Savola 2001-02-18 07:51:02 UTC
$ man /bin/echo
<standard input>:3: warning: can't find character with input code 127
<standard input>:3: warning: can't find character with input code 2
<standard input>:3: warning: can't find character with input code 3
<standard input>:3: warning: can't find character with input code 4
<standard input>:3: warning: can't find character with input code 6
<standard input>:3: warning: can't find character with input code 5
<standard input>:4: warning: can't find character with input code 7
<standard input>:4: warning: can't find character with input code 12
<standard input>:5: warning: can't break line
<standard input>:6: warning: can't break line
<standard input>:7: warning: can't break line
<standard input>:10: warning: can't break line
<standard input>:23: warning: numeric expression expected (got `N')
/usr/bin/groff: troff: Segmentation fault
grotty:<standard input>:579:fatal error: integer expected

groff might be executed with gid=man permissions (didn't check), so this might be a problem.

There is no crash on RHL7, but the output won't be pretty.

Comment 1 Binand Sethumadhavan 2001-03-05 15:09:56 UTC
This looks like someone forgot to initialize a variable, and this little 
patchlet seems to fix this. Will this break something elsewhere?

--- groff-1.15/troff/node.cc    Sun Sep 12 02:02:22 1999
+++ groff-1.15.patched/troff/node.cc    Mon Mar  5 13:01:15 2001
@@ -2428,7 +2428,7 @@
 node *bracket_node::copy()
 {
   bracket_node *on = new bracket_node;
-  node *last, *tem;
+  node *last = 0, *tem;
   for (tem = list; tem; tem = tem->next) {
     if (tem->next)
       tem->next->last = tem;



Comment 2 Florian La Roche 2001-03-07 07:41:30 UTC
This bug is fixed in the current version. Thanks for this bug-report.



Note You need to log in before you can comment on or make changes to this bug.