Bug 28210

Summary: man /bin/echo generates a segfault with groff
Product: [Retired] Red Hat Linux Reporter: Pekka Savola <pekkas>
Component: groffAssignee: Florian La Roche <laroche>
Status: CLOSED RAWHIDE QA Contact: Aaron Brown <abrown>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2CC: binand, dr
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
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: --- Target Upstream Version:
Embargoed:

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.