On Thu, Jun 11, 2020 at 05:07:17PM +0200, Otto Moerbeek wrote:
> This fixes it for me,
This looks like a simple mistake introduced back in main.c r1.222:
date: 2019/03/03 13:01:47; author: schwarze; state: Exp; lines: +3
-1;
Reset HTML formatter state, in particular the id_unique hash,
after processing each manual page, such that the next page
starts from a clean state and doesn't continue suffix numbering.
Issue found while looking at https://github.com/Debian/debiman/issues/48
which was brought up by Orestis Ioannou <oorestisime at github>.
outst is on the stack and html_reset_internal() expects a struct html
pointer, but this obviously mismatches and eventually free()s stack
memory.
820 if (outst->had_output && outst->outtype <= OUTT_UTF8) {
821 if (outst->outdata == NULL)
822 outdata_alloc(outst, &conf->output);
823 terminal_sepline(outst->outdata);
824 }
826 if (resp->form == FORM_SRC)
827 parse(mp, fd, resp->file, outst, &conf->output);
828 else {
outdata_alloc() properly allocates a struct html with html_alloc() in
our case which must be reset later in parse() through html_reset().
Pretty sure your diff is correct, but won't hurt to hear from Ingo
before committing.
OK kn