.RD macro contains .ie without .el, breaking caller's code

Bug #738169 reported by jimav
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
groff (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: groff

The .RD macro in /usr/share/groff/*/tmac/m.tmac causes .ie / .el pairs to mis-behave IN THE USER'S CODE if the optional 'string' argument is not passed to the .RD macro.

The problem seems to be a bug in the RD macro which contains ab .ie without a mathcing .el (it should be just .if, not .ie).
This causes the next .el to be seen by the roff processor to be matched with the .ie inside the RD macro, even though
the .el is in a enclosing block, such as the user's code.

I will attach a small demo script and a patch.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: groff 1.20.1-10
ProcVersionSignature: Ubuntu 2.6.35-25.44-generic 2.6.35.10
Uname: Linux 2.6.35-25-generic x86_64
Architecture: amd64
Date: Sat Mar 19 04:48:06 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release Candidate amd64 (20100928)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: groff

Revision history for this message
jimav (james-avera) wrote :
Revision history for this message
jimav (james-avera) wrote :
Revision history for this message
Colin Watson (cjwatson) wrote : Re: [Bug 738169] [NEW] .RD macro contains .ie without .el, breaking caller's code

On Sat, Mar 19, 2011 at 11:56:48AM -0000, jimav wrote:
> The .RD macro in /usr/share/groff/*/tmac/m.tmac causes .ie / .el pairs
> to mis-behave IN THE USER'S CODE if the optional 'string' argument is
> not passed to the .RD macro.
>
> The problem seems to be a bug in the RD macro which contains ab .ie
> without a mathcing .el (it should be just .if, not .ie). This causes
> the next .el to be seen by the roff processor to be matched with the
> .ie inside the RD macro, even though the .el is in a enclosing block,
> such as the user's code.
>
> I will attach a small demo script and a patch.

(For bug-groff: demo script is at
https://bugs.launchpad.net/ubuntu/+source/groff/+bug/738169/+attachment/1920491/+files/demoscript.sh,
while the patch is
https://bugs.launchpad.net/ubuntu/+source/groff/+bug/738169/+attachment/1920500/+files/patch.txt.)

Thanks for your report. I can reproduce it with groff 1.21, and the
same problem appears to be present in CVS HEAD, so forwarding upstream.

--
Colin Watson [<email address hidden>]

Changed in groff (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package groff - 1.21-5

---------------
groff (1.21-5) unstable; urgency=low

  * Fix -mm .RD macro to use .if rather than .ie (thanks, James Avera;
    LP: #738169).

groff (1.21-4) unstable; urgency=low

  * Upload to unstable.
 -- Colin Watson <email address hidden> Sun, 20 Mar 2011 16:05:01 +0000

Changed in groff (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.