bug-groff
[Top][All Lists]
Advanced

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

[bug #59993] tbl: save .hlm register correctly


From: G. Branden Robinson
Subject: [bug #59993] tbl: save .hlm register correctly
Date: Wed, 3 Feb 2021 03:01:37 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Update of bug #59993 (project groff):

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

    _______________________________________________________

Follow-up Comment #1:


commit 49a2c2cab0bbed2f3278a368a2e5d9d593dfc7a9 (HEAD -> master,
origin/master, origin/HEAD)
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Wed Feb 3 17:17:33 2021 +1100

    [tbl]: Fix integer overflow of groff register.
    
    * src/preproc/tbl/table.cpp (table::init_output): Save value of
      hyphenation maximum consecutive line count register (\n[.hlm]) more
      carefully to keep it from being incorrectly parsed as a decrement,
      because negative values of \n[.hlm] are valid (in fact, "-1" is the
      default).  In documents with a large number of tables, this can lead
      to a Persian chessboard problem and an integer overflow (at the groff
      language level, caught and handled by
      src/roff/troff/number.cpp:parse_term()).
    
      It is wise to wrap a non-literal second argument to the .nr request in
      parentheses if assignment is desired and its value can be negative.
      See section 5.6.1 ("Setting Registers") of the groff Texinfo manual.
    
    Fixes <https://savannah.gnu.org/bugs/?59993>.
    
    Problem introduced by me in commit
    cee547e8839a82f8b21b2859a9370fd74f9793f3 on 30 January.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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