dont printf arguments given by user for security sanity
This commit is contained in:
parent
64bef2ab9c
commit
948a09d6f2
@ -100,7 +100,7 @@ int watch_main(int argc, char **argv)
|
||||
//child
|
||||
dup2(old_stdout, STDOUT_FILENO);
|
||||
execvp(*watched_argv, watched_argv);
|
||||
bb_perror_msg_and_die(*watched_argv);
|
||||
bb_perror_msg_and_die("%s", *watched_argv);
|
||||
} else {
|
||||
bb_perror_msg_and_die("vfork");
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ int mountpoint_main(int argc, char **argv)
|
||||
}
|
||||
}
|
||||
if (!(opt & OPT_q))
|
||||
bb_perror_msg(arg);
|
||||
bb_perror_msg("%s", arg);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
@ -41,6 +41,6 @@ setsid_main(int argc, char *argv[]) {
|
||||
|
||||
execvp(argv[1], argv + 1);
|
||||
|
||||
bb_perror_msg_and_die(argv[1]);
|
||||
bb_perror_msg_and_die("%s", argv[1]);
|
||||
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ int fdformat_main(int argc,char **argv)
|
||||
|
||||
/* R_OK is needed for verifying */
|
||||
if (stat(*argv,&st) < 0 || access(*argv,W_OK | R_OK ) < 0) {
|
||||
bb_perror_msg_and_die(*argv);
|
||||
bb_perror_msg_and_die("%s",*argv);
|
||||
}
|
||||
if (!S_ISBLK(st.st_mode)) {
|
||||
bb_error_msg_and_die("%s: not a block device",*argv);
|
||||
|
Loading…
Reference in New Issue
Block a user