[tex4ht-commits] [SCM] tex4ht updated: r1391 - trunk/lit
Karl Berry
INVALID.NOREPLY at gnu.org.ua
Sat Oct 14 00:34:24 CEST 2023
Author: karl
Date: 2023-10-13 22:34:24 +0000 (Fri, 13 Oct 2023)
New Revision: 1391
Modified:
trunk/lit/ChangeLog
trunk/lit/tex4ht-c.tex
Log:
zero htf_4hf array to avoid uninitialized reads, https://puszcza.gnu.org.ua/bugs/?611
Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog 2023-10-13 22:00:45 UTC (rev 1390)
+++ trunk/lit/ChangeLog 2023-10-13 22:34:24 UTC (rev 1391)
@@ -1,5 +1,11 @@
2023-10-13 Karl Berry <karl at freefriends.org>
+ * tex4ht-c.tex (<mem for charset>): zero htf_4hf array after
+ allocation, to avoid uninitialized comparisons.
+ https://puszcza.gnu.org.ua/bugs/?611
+
+2023-10-13 Karl Berry <karl at freefriends.org>
+
* tex4ht-cond4ht.tex: copyright 2023.
2023-10-13 Michal Hoftich <michal.h21 at gmail.com>
Modified: trunk/lit/tex4ht-c.tex
===================================================================
--- trunk/lit/tex4ht-c.tex 2023-10-13 22:00:45 UTC (rev 1390)
+++ trunk/lit/tex4ht-c.tex 2023-10-13 22:34:24 UTC (rev 1391)
@@ -16469,6 +16469,11 @@
\<mem for charset\><<<
max_htf_4hf_n = 256;
htf_4hf = m_alloc(struct htf_4hf_rec, 256);
+/* Zero the array, since otherwise some elements of htf_4hf may be used
+ before it's initialized. See https://puszcza.gnu.org.ua/bugs/?611.
+ Eitan never wrote a wrapper like malloc_chk for calloc, so
+ just do it manually. */
+memset (htf_4hf, 0, 256 * sizeof (struct htf_4hf_rec));
>>>
\<no mem for charset\><<<
More information about the tex4ht-commits
mailing list.