about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--converter/other/cameratopam/identify.c5
-rw-r--r--doc/HISTORY6
2 files changed, 8 insertions, 3 deletions
diff --git a/converter/other/cameratopam/identify.c b/converter/other/cameratopam/identify.c
index b76913d1..e5df6b22 100644
--- a/converter/other/cameratopam/identify.c
+++ b/converter/other/cameratopam/identify.c
@@ -235,7 +235,7 @@ adobeCoeff(const char * const make,
     double cc[4][4];
     double cm[4][3];
     double xyz[] = { 1,1,1 };
-    char name[130];
+    const char * name;
     unsigned int i;
 
     /* Make an identity matrix (1's on the diagonal) */
@@ -244,7 +244,7 @@ adobeCoeff(const char * const make,
         for (j = 0; j < 4; ++j)
             cc[i][j] = (i == j);
     }
-    sprintf (name, "%s %s", make, model);
+    pm_asprintf(&name, "%s %s", make, model);
 
     for (i = 0; i < ARRAY_SIZE(table); ++i) {
         const struct CoeffTableEntry * const entryP = &table[i];
@@ -258,6 +258,7 @@ adobeCoeff(const char * const make,
             break;
         }
     }
+    pm_strfree(name);
 }
 
 
diff --git a/doc/HISTORY b/doc/HISTORY
index ed4ea102..766adac8 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -33,8 +33,12 @@ not yet  BJH  Release 10.91.00
               pnmtorle: Fix incorrect command and filename in header.
               Broken in Netpbm 10.88 (September 2019).
 
+              cameratopam: Fix buffer overrun.  Always present. (cameratopam
+              was new in Netpbm 10.28 (June 2005)).
+
               cameratopam: Fix undefined behavior using 'swab' to swap bytes
-              in place.
+              in place.  Always present. (cameratopam was new in Netpbm 10.28
+              (June 2005)).
 
               ppmtompeg: Fix buffer overruns with very long names in input
               parameter files.  Always broken.  Ppmtompeg was new in