summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwlemb <wlemb>2004-05-08 18:06:32 +0000
committerwlemb <wlemb>2004-05-08 18:06:32 +0000
commit33f163652b80bd1ea73e620dcaba8c7393c6c2a7 (patch)
treefadf624ccfbc735bf7d8d30bef207c7eef0908ae
parentec3e7631a8e613bc06c05c036c67f1c0f638e82d (diff)
downloadgroff-33f163652b80bd1ea73e620dcaba8c7393c6c2a7.tar.gz
* src/roff/troff/node.cpp (suppress_node::tprint): Don't expect
that all implementations of sprintf handle null pointers correctly.
-rw-r--r--ChangeLog5
-rw-r--r--src/roff/troff/node.cpp5
2 files changed, 9 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 20fbc7ff..efda9161 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-05-07 Keith Marshall <keith.d.marshall@ntlworld.com>
+
+ * src/roff/troff/node.cpp (suppress_node::tprint): Don't expect
+ that all implementations of sprintf handle null pointers correctly.
+
2004-05-04 Werner LEMBERG <wl@gnu.org>
* NEWS, man/groff_diff.man, man/groff.man, doc/groff.texinfo:
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 3f24d90b..e3d4d86d 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -3774,7 +3774,10 @@ void suppress_node::tprint(troff_output_file *out)
char name[8192];
// remember that the filename will contain a %d in which the
// last_image_id is placed
- sprintf(name, last_image_filename, last_image_id);
+ if (last_image_filename == (char *) 0)
+ *name = '\0';
+ else
+ sprintf(name, last_image_filename, last_image_id);
if (is_html) {
switch (last_position) {
case 'c':