Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 7d1b3cab6f70a24c7213372973b64efd > files > 1

tkcvs-7.2.2-1.1.102mdk.src.rpm

--- tkcvs_7_2_2/tkdiff/tkdiff.cve-2005-3343	2006-01-03 12:34:05.078974734 -0700
+++ tkcvs_7_2_2/tkdiff/tkdiff	2006-01-03 12:34:05.080974369 -0700
@@ -444,13 +444,20 @@
 }
 
 ###############################################################################
-# Return the name of a temporary file
+# Create a temporary file and return it's name
 ###############################################################################
 
 proc tmpfile {n} {
     global opts
     set tmpdir [file nativename $opts(tmpdir)]
     set tmpfile [file join $tmpdir "[pid]-$n"]
+    set access [list RDWR CREAT EXCL TRUNC]
+    set perm 0600
+    if {[catch {set fid [open $tmpfile $access $perm]}]} {
+            # something went wrong
+            error "Failed creating temporary file: $errorCode"
+    }
+    close $fid     
     return $tmpfile
 }