summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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':