mirror of https://github.com/mirror/busybox.git
Don't allow mkfifo to create files such as "--help"
This patch checks if the name of FIFO to be created begins with "-" and calls usage() if it does. Regards, Pavel Roskin1_00_stable_10817
parent
ef4268efa7
commit
46a38dbb9b
|
@ -60,7 +60,7 @@ extern int mkfifo_main(int argc, char **argv)
|
|||
argc--;
|
||||
argv++;
|
||||
}
|
||||
if (argc < 1)
|
||||
if (argc < 1 || *argv[0] == '-')
|
||||
usage(mkfifo_usage);
|
||||
if (mkfifo(*argv, mode) < 0) {
|
||||
perror("mkfifo");
|
||||
|
|
Loading…
Reference in New Issue