Bug 28210 - man /bin/echo generates a segfault with groff
man /bin/echo generates a segfault with groff
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: groff (Show other bugs)
6.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Florian La Roche
Aaron Brown
: Security
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-02-18 02:51 EST by Pekka Savola
Modified: 2007-04-18 12:31 EDT (History)
2 users (show)

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


Attachments (Terms of Use)

  None (edit)
Description Pekka Savola 2001-02-18 02:51:02 EST
$ 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 10:09:56 EST
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 02:41:30 EST
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.