bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #64505] [troff] `fzoom` should not accept a mounting position or ab


From: G. Branden Robinson
Subject: [bug #64505] [troff] `fzoom` should not accept a mounting position or abstract style name as argument
Date: Wed, 9 Aug 2023 18:05:40 -0400 (EDT)

Update of bug #64505 (project groff):

                  Status:             In Progress => Fixed                  
             Open/Closed:                    Open => Closed                 
         Planned Release:                    None => 1.24.0                 

    _______________________________________________________

Follow-up Comment #1:


commit 1ec23073031e6bc3bcba90dbaef9d9db1ae3f167
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Thu Aug 3 17:10:59 2023 -0500

    [troff]: Validate `fzoom` arguments more.
    
    * src/roff/troff/node.cpp (zoom_font): Validate arguments more.  Invalid
      inputs could have bizarre consequences.
    
    Fixes <https://savannah.gnu.org/bugs/?64505>.
    
    Also annotate what `mount_font_no_translate()` does.
    
    Tested as follows.
    
    $ cat EXPERIMENTS/fzoom-errors.groff
    .fzoom
    .fzoom 1
    .fzoom TR
    .fzoom BOGUS 0
    .fzoom R 0
    .fzoom TR -100
    
    groff 1.22.4:
    $ /usr/bin/groff -ww -z EXPERIMENTS/fzoom-errors.groff
    troff: EXPERIMENTS/fzoom-errors.groff:1: warning: missing number
    troff: EXPERIMENTS/fzoom-errors.groff:4: warning: can't find font 'BOGUS'
    troff: EXPERIMENTS/fzoom-errors.groff:6: warning: can't use negative zoom
factor
    
    groff 1.23.0:
    $ groff -ww -z EXPERIMENTS/fzoom-errors.groff
    troff:EXPERIMENTS/fzoom-errors.groff:1: warning: numeric expression
missing
    troff:EXPERIMENTS/fzoom-errors.groff:1: error: cannot load font at
position -1 to set a zoom factor for it
    troff:EXPERIMENTS/fzoom-errors.groff:4: error: cannot load font 'BOGUS' to
set a zoom factor for it
    troff:EXPERIMENTS/fzoom-errors.groff:6: warning: can't use negative zoom
factor
   
    groff Git:
    $ ./build/test-groff -ww -z EXPERIMENTS/fzoom-errors.groff
    troff:EXPERIMENTS/fzoom-errors.groff:1: warning: font name expected in
zoom factor setting request
    troff:EXPERIMENTS/fzoom-errors.groff:2: warning: cannot set zoom factor of
a font mounting position
    troff:EXPERIMENTS/fzoom-errors.groff:3: warning: zoom factor expected in
zoom factor setting request
    troff:EXPERIMENTS/fzoom-errors.groff:4: error: cannot mount font 'BOGUS'
to set a zoom factor for it
    troff:EXPERIMENTS/fzoom-errors.groff:5: error: cannot mount font 'R' to
set a zoom factor for it
    troff:EXPERIMENTS/fzoom-errors.groff:6: warning: ignoring negative font
zoom factor '-100'




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64505>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]