Commits

Boris Nagaev committed 9487005

(fix) do not use tmpnam(NULL), it causes races

  • Participants
  • Parent commits 8dfa167
  • Branches 1.4

Comments (0)

Files changed (2)

+2012-11-29:
+    * (fix) do not use tmpnam(NULL), it causes races
+
 2012-10-19:
     * (fix) add virtual destructor to abstract class Event (Notify)
 

File src/util.cpp

 #else
     string result;
     for (int attempt = 0; attempt < 10; attempt++) {
-        string path = tmpnam(NULL);
+        char file_template[L_tmpnam];
+        string path = tmpnam(file_template);
         ofstream file_out(path.c_str());
         if (file_out.is_open()) {
             int secret = rr();