Update of bug #61206 (project groff):
Status: In Progress => Fixed
Open/Closed: Open => Closed
Planned Release: None => 1.23.0
_______________________________________________________
Follow-up Comment #2:
commit 423e3c0b45a59c5476a2adc95bd38426a40456f3
Author: G. Branden Robinson <[email protected]>
Date: Tue Sep 28 16:05:36 2021 +1000
[pic]: Update input file name correctly.
* src/preproc/pic/troff.cpp (troff_output::set_location): Copy the
inbound file name argument with `strdup()` and store pointer to this
copy in `last_filename` instead of aliasing argument.
(troff_output::~troff_output): `free()` the memory allocated by
`strdup()` in destructor.
Fixes <https://savannah.gnu.org/bugs/?61206>. Pointer assignment
instead of a string copy was being performed, which means that after its
initial assignment, `last_filename` always shared its value ultimately
with the `current_filename` pointer (a libgroff symbol), so `strcmp()`
was always being performed on identical pointers. Problem appears to
date back 30+ years, to the dawn of our repo history.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?61206>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/