X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Fm_scratch.c;h=3c63d092d221510bd43c352158abcd959c4ee22e;hp=30601f14698461805981cb066fcba38820895041;hb=5dd6771b28c257af405d7248639ed0e3bcdce38b;hpb=6c42153ad9362cc676ea66563bf400d7511b3b68 diff --git a/sbr/m_scratch.c b/sbr/m_scratch.c index 30601f1..3c63d09 100644 --- a/sbr/m_scratch.c +++ b/sbr/m_scratch.c @@ -2,8 +2,6 @@ /* * m_scratch.c -- construct a scratch file * - * $Id$ - * * This code is Copyright (c) 2002, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. @@ -11,7 +9,10 @@ #include - +/*************************************************************************** + * 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 +34,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;