about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--converter/other/pnmtorle.c5
-rw-r--r--doc/HISTORY4
2 files changed, 5 insertions, 4 deletions
diff --git a/converter/other/pnmtorle.c b/converter/other/pnmtorle.c
index 180b144f..8908c356 100644
--- a/converter/other/pnmtorle.c
+++ b/converter/other/pnmtorle.c
@@ -212,7 +212,6 @@ main(int argc, char **  argv) {
 
     const char * pnmname;
     const char * outname;
-    static char filename[BUFSIZ];
     int oflag;
 
     pnm_init(&argc, argv);
@@ -239,11 +238,9 @@ main(int argc, char **  argv) {
 
     /* Open the file. */
     if (pnmname == NULL) {
-        strcpy(filename, "stdin");
         fp = pm_openr("-");
     } else {
-        strcpy(filename, pnmname);
-        fp = pm_openr(filename);
+        fp = pm_openr(pnmname);
     }
 
     hdr.rle_file = rle_open_f( hdr.cmd, outname, "wb" );
diff --git a/doc/HISTORY b/doc/HISTORY
index 44e97390..e62a4fff 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -25,6 +25,10 @@ not yet  BJH  Release 10.71.00
               pbmtoxbm: Fix bug: crash with zero width input.  Broken in
               Netpbm 10.37 (December 2006).
 
+              pnmtorle: Fix buffer overrun with long file name.  Always
+              present.  (pnmtorle was new to Netpbm in Netpbm 9.0 (April
+              2000)).
+
               pbmtopi3: Fix bug: wrong output when input is higher or wider
               than 640 pixels.  Always broken (pbmtopi3 was new in Netpbm 1
               (September 1991).