openbsd-ports/mail/nmh/patches/patch-ac
kevlo e6a3c04669 - Upgrade to 1.0.3 and fix the security problem.
- Mark unbroken.
- Update the MASTER_SITES.
2000-03-08 05:11:35 +00:00

28 lines
509 B
Plaintext

--- sbr/m_tmpfil.c.orig Thu Sep 9 22:22:41 1999
+++ sbr/m_tmpfil.c Tue Feb 29 18:06:52 2000
@@ -14,15 +14,18 @@
static char tmpfil[BUFSIZ];
snprintf (tmpfil, sizeof(tmpfil), "/tmp/%sXXXXXX", template);
-/*
- Mkstemp work postponed until later -Doug
#ifdef HAVE_MKSTEMP
- unlink(mkstemp(tmpfil));
+ {
+ int fd;
+
+ fd = mkstemp (tmpfil);
+ if (fd == -1)
+ return 0;
+ close (fd);
+ unlink (tmpfil);
+ }
#else
-*/
unlink(mktemp(tmpfil));
-/*
#endif
-*/
return tmpfil;
}