changeset 3231:b913fc07e18a

[gaim-migrate @ 3248] Changed tempfile creation to use new gaim_mkstemp() for secure tempfile creation. committer: Tailor Script <tailor@pidgin.im>
author Jim Seymour <jseymour>
date Tue, 07 May 2002 23:13:20 +0000
parents d05dc05bde8a
children cf460a8c859c
files src/protocols/msn/msn.c
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/msn/msn.c	Tue May 07 23:12:14 2002 +0000
+++ b/src/protocols/msn/msn.c	Tue May 07 23:13:20 2002 +0000
@@ -1264,11 +1264,10 @@
 
 		if (md->passport) {
 			unlink(md->passport);
-			free(md->passport);
+			g_free(md->passport);
 		}
-		md->passport = tempnam(NULL, NULL);
 
-		fd = fopen(md->passport, "w");
+		fd = gaim_mkstemp(&(md->passport));
 		fprintf(fd, "<html>\n");
 		fprintf(fd, "<head>\n");
 		fprintf(fd, "<noscript>\n");
@@ -1780,7 +1779,7 @@
 		g_free(md->msguser);
 	if (md->passport) {
 		unlink(md->passport);
-      		free(md->passport);
+      		g_free(md->passport);
 	}
 	while (md->switches)
 		msn_kill_switch(md->switches->data);