···1+--- tools/rlecat.c
2++++ tools/rlecat.c
3+@@ -110,8 +110,14 @@
4+ nflag = 0; /* Not really repeating! */
5+ else
6+ {
7+- mktemp( temp ); /* Make a temporary file name */
8+- tmpfile = rle_open_f( cmd_name( argv ), temp, "w+" );
9++ /* we dont have to use rle_open_f() because all it does in
10++ * this case is run fopen() ... we're creating a file so all
11++ * the checks for opening an existing file aren't needed */
12++ int fd = mkstemp(temp);
13++ if (fd == -1 || (tmpfile = fdopen(fd, "w+")) == NULL) {
14++ perror("Unable to open tempfile");
15++ exit(-1);
16++ }
17+ }
18+ }
19+