[tex4ht] [bug #611] Random SIGSEGV of tex4ht due to invalid memory accesses

Karl Berry puszcza-hackers at gnu.org.ua
Sat Oct 14 00:47:26 CEST 2023

Update of bug #611 (project tex4ht):

                  Status:                    None => Ready For Test         


Follow-up Comment #4:

Hi again Oliver - well, I couldn't discern any plausible way to initialize the
htf_4hf array on the fly, so I just memset the whole array to zero after it is
allocated. That is, after this line:

htf_4hf = m_alloc(struct htf_4hf_rec, 256);

I added (some comments and):
memset (htf_4hf, 0, 256 * sizeof (struct htf_4hf_rec));

and valgrind was blessedly silent afterwards. The HTML output on your sample
file was unchanged. I didn't test anything else specifically.

It's been a while since I called memset by hand :), so please do let me know
if you see problems. (Eitan never wrote a wrapper for calloc as he did for
malloc, so this seemed the simplest way.)

I also committed the new source to TL, r68541.

And I also installed a new tex4ht binary for x86_64-linux (only) since, well,
why not (r68542). I'm not sure if you are building from source or using our
binaries. Let me know if I need to do more to propagate the fix so you'll get

Thanks again for doing all the real work here. 


Reply to this item at:


  Message sent via/by Puszcza

More information about the tex4ht mailing list.