Skip to content

Commit a648b31

Browse files
committed
Fix buffer underflow (Issue #338)
1 parent 2ac41bf commit a648b31

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- Added support for dc:subject and dc:language metadata in EPUB output from the
88
HTML keywords and lang values.
99
- Added support for the subject and language metadata in markdown input.
10+
- Fixed a buffer underflow bug (Issue #338)
1011

1112

1213
# Changes in HTMLDOC v1.9.4

htmldoc/ps-pdf.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5188,7 +5188,7 @@ parse_paragraph(tree_t *t, /* I - Tree to parse */
51885188
linewidth += temp_width;
51895189
lineptr += strlen((char *)lineptr);
51905190

5191-
if (lineptr[-1] == ' ')
5191+
if (lineptr > line && lineptr[-1] == ' ')
51925192
whitespace = 1;
51935193
else
51945194
whitespace = 0;

0 commit comments

Comments
 (0)