bug-groff
[Top][All Lists]
Advanced

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

[bug #64229] [troff] want diagnostic for diversion length overflow


From: G. Branden Robinson
Subject: [bug #64229] [troff] want diagnostic for diversion length overflow
Date: Thu, 15 Aug 2024 13:20:40 -0400 (EDT)

Update of bug #64229 (group groff):

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

    _______________________________________________________

Follow-up Comment #8:


commit 41ce02672a795aa52d408e1e64c0c093934fdf3e
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Wed Aug 14 11:01:54 2024 -0500

    [troff]: Fix Savannah #64229.
    
    Throw diagnostic in event of a diversion's contents overflowing its
    vertical position.  We can't do anything sensible in this case, so make
    it a fatal error.  (It's also more likely that your host environment
    will exhaust memory available to the `troff` process before encountering
    this problem.)
    
    * src/roff/troff/div.cpp: New constant symbol `DIVERSION_LENGTH_MAX`
      defines the maximum permissible vertical size of a diversion in basic
      units.  Presently, it is `INT_MAX`.
    
      (macro_diversion::distance_to_next_trap): When there is no diversion
      trap, or it has already been passed, report the distance to
      `DIVERSION_LENGTH_MAX` (rather than `INT_MAX`) divided by the vertical
      resolution.
    
      (macro_diversion::output): Check for overflow when incrementing
      vertical position upon writing out a line, and emit fatal error
      diagnostic if it occurs.
    
    Fixes <https://savannah.gnu.org/bugs/?64229>.  Thanks to Dave Kemper for
    the discussion.




    _______________________________________________________

Reply to this item at:

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

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

Attachment: signature.asc
Description: PGP signature


reply via email to

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