]> git.marmaro.de Git - mmh/blobdiff - sbr/m_scratch.c
* uip/.cvsignore: added "new".
[mmh] / sbr / m_scratch.c
index 30601f14698461805981cb066fcba38820895041..353da5624d56daff00301dc179dbe8d9e0cbe794 100644 (file)
 
 #include <h/mh.h>
 
-
+/***************************************************************************
+ * DO NOT USE THIS FUNCTION!  IT WILL BE REMOVED IN THE FUTURE.
+ * THIS FUNCTION IS INSECURE.  USE THE FUNCTIONS DEFINED IN m_mktemp.c.
+ ***************************************************************************/
 char *
 m_scratch (char *file, char *template)
 {
@@ -33,7 +36,7 @@ m_scratch (char *file, char *template)
     if ((cp = r1bindex (file, '/')) == file)
        strncpy (buffer, tmpfil, sizeof(buffer));
     else
-       snprintf (buffer, sizeof(buffer), "%.*s%s", cp - file, file, tmpfil);
+       snprintf (buffer, sizeof(buffer), "%.*s%s", (int)(cp - file), file, tmpfil);
     unlink (buffer);
 
     return buffer;