SHA256
1
0
forked from pool/htmldoc
htmldoc/htmldoc-CVE-2024-45508.patch
Martin Pluskal 1dcbb9b3e2 - security update
- added patches
  fix CVE-2024-45508 [bsc#1230022], HTMLDOC before 1.9.19 has an out-of-bounds write in parse_paragraph in ps-pdf.cxx because of an attempt to strip leading whitespace from a whitespace-only node.
  + htmldoc-CVE-2024-45508.patch

OBS-URL: https://build.opensuse.org/package/show/Publishing/htmldoc?expand=0&rev=42
2024-09-03 06:27:49 +00:00

14 lines
576 B
Diff

Index: htmldoc-1.9.18/htmldoc/ps-pdf.cxx
===================================================================
--- htmldoc-1.9.18.orig/htmldoc/ps-pdf.cxx
+++ htmldoc-1.9.18/htmldoc/ps-pdf.cxx
@@ -5234,7 +5234,7 @@ parse_paragraph(tree_t *t, /* I - Tree t
if (temp->markup != MARKUP_A)
break;
- if (temp != NULL && temp->markup == MARKUP_NONE && temp->data[0] == ' ')
+ if (temp != NULL && temp->markup == MARKUP_NONE && temp->data[0] == ' ' && temp->data[1])
{
// Drop leading space...
for (dataptr = temp->data; *dataptr; dataptr ++)