[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #63751] [tbl] reads from uninitialized memory when reporting diagno
From: |
G. Branden Robinson |
Subject: |
[bug #63751] [tbl] reads from uninitialized memory when reporting diagnostic |
Date: |
Fri, 3 Feb 2023 06:08:46 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?63751>
Summary: [tbl] reads from uninitialized memory when reporting
diagnostic
Project: GNU troff
Submitter: gbranden
Submitted: Fri 03 Feb 2023 11:08:44 AM UTC
Category: Preprocessor tbl
Severity: 3 - Normal
Item Group: Incorrect behaviour
Status: In Progress
Privacy: Public
Assigned to: gbranden
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Fri 03 Feb 2023 11:08:44 AM UTC By: G. Branden Robinson <gbranden>
Affects groff 1.22.4.
When attempting to open a nonexistent file after successfully opening an
existing one, tbl can read from uninitialized memory.
Here is a reproducer that works on my system, but behavior seems to vary
depending on details of the existing filename and maybe the current working
directory. Sticking the existent file into a subdirectory seems to be more
reliable. Odd.
$ test -f ATTIC/tableN.roff && tbl ATTIC/tableN.roff nonexistent-file
>/dev/null
tbl:pH��U:11: fatal error: can't open 'nonexistent-file': No such file or
directory
$ test -f existent-file.roff && tbl existent-file.roff nonexistent-file.roff
>/dev/null
tbl::1: fatal error: can't open 'nonexistent-file.roff': No such file or
directory
$ test -f existent-file.roff && tbl existent-file.roff nonexistent-file.roff
>/dev/null
tbl:existent-file.roff:2: end of input while processing format
tbl:existent-file.roff:2: giving up on this table
tbl::3: fatal error: can't open 'nonexistent-file.roff': No such file or
directory
$ test -f ATTIC/existent-file.roff && tbl ATTIC/existent-file.roff
nonexistent-file.roff >/dev/null
tbl:ATTIC/existent-file.roff:2: end of input while processing format
tbl:ATTIC/existent-file.roff:2: giving up on this table
tbl:Ae�U:3: fatal error: can't open 'nonexistent-file.roff': No such file or
directory
Anyway, I have a fix for this.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63751>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #63751] [tbl] reads from uninitialized memory when reporting diagnostic,
G. Branden Robinson <=