about summary refs log tree commit diff
path: root/converter/ppm
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2020-09-05 03:43:20 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2020-09-05 03:43:20 +0000
commit7be746fbeb76be6cb6d106d39a03cf59655a7160 (patch)
tree83de34952b6de99be8d762108cf3480e0ce646eb /converter/ppm
parentaf1a5fa0c7953c94cb911059cace91bb7ffde66e (diff)
downloadnetpbm-mirror-7be746fbeb76be6cb6d106d39a03cf59655a7160.tar.gz
netpbm-mirror-7be746fbeb76be6cb6d106d39a03cf59655a7160.tar.xz
netpbm-mirror-7be746fbeb76be6cb6d106d39a03cf59655a7160.zip
Fix use of string from user as a format string
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3939 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter/ppm')
-rw-r--r--converter/ppm/ximtoppm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/converter/ppm/ximtoppm.c b/converter/ppm/ximtoppm.c
index d844031c..d839e770 100644
--- a/converter/ppm/ximtoppm.c
+++ b/converter/ppm/ximtoppm.c
@@ -125,9 +125,9 @@ ReadXimHeader(FILE *     const in_fp,
 #endif
     header->bits_channel = atoi(a_head.bits_per_channel);
     header->alpha_flag = atoi(a_head.alpha_channel);
-    pm_asprintf(&header->author,  a_head.author);
-    pm_asprintf(&header->date,    a_head.date);
-    pm_asprintf(&header->program, a_head.program);
+    header->author = pm_strdup(a_head.author);
+    header->date = pm_strdup(a_head.date);
+    header->program = pm_strdup(a_head.program);
 
     /* Do double checking for backwards compatibility */
     if (header->npics == 0)