]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Remove sprintf() call in sendfax.c++
authorRobert Colquhoun <rjc@trump.net.au>
Wed, 20 Sep 2000 04:54:04 +0000 (04:54 +0000)
committerRobert Colquhoun <rjc@trump.net.au>
Wed, 20 Sep 2000 04:54:04 +0000 (04:54 +0000)
sendfax/.cvsignore
sendfax/sendfax.c++

index be4392589f27f8117da60185cae535798baf5602..e5e3de5393861a9f9f2364b1c1559167699feafd 100644 (file)
@@ -1,3 +1,4 @@
 .c++dependtime
+Makedepend
 Makefile
 sendfax
index 756cb46879460aca4ea561d1fff2cc92385d7623..0d65095d79dcbb51d62b36eafce6161684f7c25d 100644 (file)
@@ -271,10 +271,11 @@ sendFaxApp::addDestination(const char* cp)
 void
 sendFaxApp::copyToTemporary(int fin, fxStr& tmpl)
 {
-    char buff[128];
-    sprintf(buff, "%s/sndfaxXXXXXX", _PATH_TMP);
+    const char* templ = _PATH_TMP "/sndfaxXXXXXX";
+    char* buff = strcpy(new char[strlen(templ) + 1], templ);
     int fd = Sys::mkstemp(buff);
     tmpl = buff;
+    delete [] buff;
     if (fd < 0) {
         fatal("%s: Can not create temporary file", (const char*) tmpl);
     }