about summary refs log tree commit diff
path: root/converter
diff options
context:
space:
mode:
Diffstat (limited to 'converter')
-rw-r--r--converter/pbm/pbmtonokia.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/converter/pbm/pbmtonokia.c b/converter/pbm/pbmtonokia.c
index 73b62b96..80b0bd59 100644
--- a/converter/pbm/pbmtonokia.c
+++ b/converter/pbm/pbmtonokia.c
@@ -412,7 +412,8 @@ convertToNpm(bit **       const image,
     header[       3] = 0;
     header[       4] = len;
     header[       5] = 0;
-    memcpy(&header[5], text, len);
+    if (text)
+        memcpy(&header[6], text, len);
     header[ 6 + len] = cols;
     header[ 7 + len] = rows;
     header[ 8 + len] = 1;