[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 02/08: [troff]: Fix regression in \O2 escape handling.
From: |
G. Branden Robinson |
Subject: |
[groff] 02/08: [troff]: Fix regression in \O2 escape handling. |
Date: |
Fri, 30 Jul 2021 01:25:02 -0400 (EDT) |
gbranden pushed a commit to branch master
in repository groff.
commit 991aa9daf607765fecb92f9476055d057b3d36e2
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Fri Jul 30 13:04:24 2021 +1000
[troff]: Fix regression in \O2 escape handling.
Fix regression (breaking important pdfmark/pdfroff features) caused by
my commit e876d4bfd193abb9a7d1fb6e76519349bded482a, 27 July. An empty
image file name is in fact semantically valid when writing a bounding
box; pdfmark uses such boxes to frame hyperlinks. Avoid null pointer
dereference by initializing `image_filename` to an empty string literal.
Thanks to Tadziu Hoffman and Keith Marshall for their patient
explanations.
---
ChangeLog | 11 +++++++++++
src/roff/troff/node.cpp | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index 113cbb5..e1021f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2021-07-30 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ [troff]: Fix regression (breaking important pdfmark/pdfroff
+ features) caused by my commit
+ e876d4bfd193abb9a7d1fb6e76519349bded482a, 27 July. An empty
+ image file name is in fact semantically valid when writing a
+ bounding box; pdfmark uses such boxes to frame hyperlinks.
+ Avoid null pointer dereference by initializing `image_filename`
+ to an empty string literal. Thanks to Tadziu Hoffman and Keith
+ Marshall for their patient explanations.
+
2021-07-29 G. Branden Robinson <g.branden.robinson@gmail.com>
[troff]: Refactor some internal functions.
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index fdb52c7..f20b3ba 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -4052,7 +4052,7 @@ void suppress_node::put(troff_output_file *out, const
char *s)
*/
static char last_position = 0;
-static const char *image_filename = 0;
+static const char *image_filename = "";
static int subimage_counter = 0;
inline int min(int a, int b)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 02/08: [troff]: Fix regression in \O2 escape handling.,
G. Branden Robinson <=