gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r9953: Correct use of tmpnam


From: Sandro Santilli
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r9953: Correct use of tmpnam
Date: Tue, 07 Oct 2008 12:38:20 +0200
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9953
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Tue 2008-10-07 12:38:20 +0200
message:
  Correct use of tmpnam
modified:
  plugin/plugin.cpp
=== modified file 'plugin/plugin.cpp'
--- a/plugin/plugin.cpp 2008-10-07 07:26:12 +0000
+++ b/plugin/plugin.cpp 2008-10-07 10:38:20 +0000
@@ -869,12 +869,12 @@
                PRBool res = FALSE;
                ofstream fout;
                mode_t oldmask = umask(0077);
+               char tmpnamebuf[L_tmpnam];
                while(!res) {
-                       char *tmpname = tmpnam("gnash-cookies");
+                       const char *tmpname = tmpnam(tmpnamebuf); 
                        fout.open(tmpname, ios::out | ios::trunc);
                        if(!fout.is_open()) {
                                cout << "not opened!!" << endl;
-                               g_free(tmpname);
                                continue;
                        } else {
                                cout << "opened cookie store: " << tmpname << 
endl;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]