shithub: sox

Download patch

ref: a06902b53f50964e680b284c7647e90175baac05
parent: ba30b3af35088ff41344b40e1e2247d7db14bde0
author: cbagwell <cbagwell>
date: Sat Mar 18 22:01:53 EST 2006

Prevent error messages from causing crashes.

--- a/src/sox.c
+++ b/src/sox.c
@@ -765,7 +765,7 @@
          * we are exiting anyways.
          */
         if (st_close(file_desc[f]) == ST_EOF)
-            st_warn(file_desc[f]->st_errstr);
+            st_warn("%s", file_desc[f]->st_errstr);
     }
 
     if (writing)
@@ -774,7 +774,7 @@
          * are exiting anyways.
          */
         if (st_close(file_desc[file_count-1]) == ST_EOF)
-            st_warn(file_desc[file_count-1]->st_errstr);
+            st_warn("%s", file_desc[file_count-1]->st_errstr);
     }
 }