bugGNU roff - Bugs: bug #63214, [eqn] reads from uninitialized...

 
 

bug #63214: [eqn] reads from uninitialized memory when reporting file name in diagnostics

Submitter:  G. Branden Robinson <gbranden>
Submitted:  Fri 14 Oct 2022 06:37:15 PM UTC
   
 
Category:  Preprocessor eqn Severity:  3 - Normal
Item Group:  Incorrect behaviour Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.23.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 03 Feb 2023 09:49:22 PM UTC, comment #2: 


commit 947a6822a1667457b249856d76e3741329e31848
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Fri Feb 3 04:40:25 2023 -0600

    [eqn]: Fix Savannah #63214.

    * src/preproc/eqn/lex.cpp (get_delimited_text): Avoid reading from
      invalid memory when throwing diagnostic.  Duplicate `filename` string,
      then free it on all paths out of function.

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


G. Branden Robinson <gbranden>
Group administrator
Fri 03 Feb 2023 10:29:51 AM UTC, comment #1: 

I have a fix.


$ ./build/eqn EXPERIMENTS/hosed-eqn.roff > /dev/null
./build/eqn:EXPERIMENTS/hosed-eqn.roff:16: error: end of input while defining macro


...that's much better.

G. Branden Robinson <gbranden>
Group administrator
Fri 14 Oct 2022 06:37:15 PM UTC, original submission:  

Affects groff 1.22.4.

Does not reliably reproduce when reading from stdin.


$ eqn EXPERIMENTS/hosed-eqn.roff >/dev/null
eqn:�k)"�U:16: end of input while defining macro


My guess is this affects any _eqn_ diagnostic, but I haven't confirmed that yet.

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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-02-03 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2023-02-03 gbranden StatusNone In Progress
        Assigned toNone gbranden
        Planned ReleaseNone 1.23.0

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code