$OpenBSD: patch-src_transce8_c,v 1.1 2005/09/05 13:48:52 espie Exp $
--- src/transce8.c.orig	Sun Jul 27 01:20:00 1997
+++ src/transce8.c	Mon Sep  5 15:40:06 2005
@@ -296,7 +296,7 @@ int     main
 {
 	FILE    *SRCfile = stdin ;      /* Source default is stdin           */
 	FILE    *DSTfile = stdout ;     /* Dest. default is stdout           */
-	char    *TmpName = (char *) NULL ;
+	char    TmpName[40];
 	char    *Help ;
 	int     codes ;                 /* bad code flag                     */
 	int     syntax ;                /* return code for ScanFlags ()      */
@@ -408,11 +408,9 @@ int     main
 			f_date.modtime = f_stat.st_mtime ;
 #endif
 
-			TmpName = tmpnam ((char *) NULL) ;
-			Help = strrchr (TmpName, '/') ;
-			if (Help != (char *) NULL)
-				TmpName = ++Help ;
-			DSTfile = fopen (TmpName, "wb") ;
+			strcpy(TmpName, "trs.XXXXXXXXXX");
+			Help = TmpName;
+			DSTfile = fdopen ((int) mkstemp(TmpName), "wb") ;
 			if (DSTfile == (FILE *) NULL)
 			{
 				fclose (SRCfile) ;
