The first bugfix wasn't sufficient for mktemp subdir/filename.XXXXXX

Probably needs a test suite entry for this case, too...

diff -ru busybox/debianutils/mktemp.c busybox.new/debianutils/mktemp.c
--- busybox/debianutils/mktemp.c        2010-07-24 17:12:56.000000000 -0500
+++ busybox.new/debianutils/mktemp.c    2010-07-26 16:20:05.000000000 -0500
@@ -50,7 +50,7 @@
        opts = getopt32(argv, "dqtp:", &path);
 
        chp = argv[optind] ? argv[optind] : xstrdup("tmp.XXXXXX");
-       if (chp[0] != '/' || (opts & 8))
+       if (!strchr(chp, '/') || (opts & 8))
                chp = concat_path_file(path, chp);
 
        if (opts & 1) { /* -d */

-- 
GPLv3: as worthy a successor as The Phantom Menace, as timely as Duke Nukem 
Forever, and as welcome as New Coke.
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to