htmldoc/htmldoc-CVE-2024-46478.patch
Dr. Werner Fink da2e06686b - security update
- added patches
  fix CVE-2024-46478 [bsc#1232380], buffer overflow when handling tabs through the parse_pre function (ps-pdf.cxx)
  + htmldoc-CVE-2024-46478.patch

OBS-URL: https://build.opensuse.org/package/show/Publishing/htmldoc?expand=0&rev=44
2024-11-05 07:58:46 +00:00

28 lines
914 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
@@ -5702,10 +5702,13 @@ parse_pre(tree_t *t, /* I - Tree to par
case MARKUP_NONE :
for (lineptr = line, dataptr = start->data;
- *dataptr != '\0' && lineptr < (line + sizeof(line) - 1);
+ *dataptr != '\0' && lineptr < (line + sizeof(line) - 9);
dataptr ++)
+ {
if (*dataptr == '\n')
+ {
break;
+ }
else if (*dataptr == '\t')
{
/* This code changed after 15 years to work around new compiler optimization bugs (Issue #349) */
@@ -5720,6 +5723,7 @@ parse_pre(tree_t *t, /* I - Tree to par
*lineptr++ = *dataptr;
col ++;
}
+ }
*lineptr = '\0';