bugGNU roff - Bugs: bug #60935, [troff] option parser lets you...

 
 

bug #60935: [troff] option parser lets you create a nameless register or string

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Sun 18 Jul 2021 07:42:31 PM UTC
   
 
Category:  Core Severity:  2 - Minor
Item Group:  Warning/Suspicious behaviour Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.23.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 19 Jul 2021 06:37:58 PM UTC, comment #1: 


commit 7b142b5159869ec390188ce365ad5d779f1a7813
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Mon Jul 19 08:20:00 2021 +1000

    [troff]: Emit error if -d, -r argument malformed.

    * src/roff/troff/input.cpp (main): Emit error diagnostic if `-d` or `-r`
      option is given a malformed argument.  This prevents a string or
      register with an empty name from being created.

    Fixes <https://savannah.gnu.org/bugs/?60935>.


G. Branden Robinson <gbranden>
Group administrator
Sun 18 Jul 2021 07:42:31 PM UTC, original submission:  


$ echo '.pm' | groff -d=a
$ echo '.pm' | groff -d==a
$ echo '.pm' | groff -r=1+2+3+4+5


Output not recorded here; try it yourself and let your eyebrow rise.

roff identifiers are notably generous in their naming conventions, but there's no way to interpolate a null one, so this window should probably be closed.

I'm guessing there is a missing NULL or strlen()==0 check in the option parser.

G. Branden Robinson <gbranden>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-07-19 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.23.0
        Summary[troff] option parser will let you create a nameless register or string [troff] option parser lets you create a nameless register or string

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code