allow /tmp

This commit is contained in:
van Hauser
2020-06-22 07:16:24 +02:00
parent 5cad92e57e
commit a49b5ef072
5 changed files with 50 additions and 50 deletions

View File

@ -2128,14 +2128,17 @@ void check_binary(afl_state_t *afl, u8 *fname) {
/* Check for blatant user errors. */
if ((!strncmp(afl->fsrv.target_path, "/tmp/", 5) &&
!strchr(afl->fsrv.target_path + 5, '/')) ||
(!strncmp(afl->fsrv.target_path, "/var/tmp/", 9) &&
!strchr(afl->fsrv.target_path + 9, '/'))) {
/* disabled. not a real-worl scenario where this is a problem.
if ((!strncmp(afl->fsrv.target_path, "/tmp/", 5) &&
!strchr(afl->fsrv.target_path + 5, '/')) ||
(!strncmp(afl->fsrv.target_path, "/var/tmp/", 9) &&
!strchr(afl->fsrv.target_path + 9, '/'))) {
FATAL("Please don't keep binaries in /tmp or /var/tmp");
FATAL("Please don't keep binaries in /tmp or /var/tmp");
}
}
*/
fd = open(afl->fsrv.target_path, O_RDONLY);

View File

@ -533,7 +533,7 @@ void sync_fuzzers(afl_state_t *afl) {
s32 fd;
struct stat st;
snprintf(path, sizeof (path), "%s/%s", qd_path, namelist[o]->d_name);
snprintf(path, sizeof(path), "%s/%s", qd_path, namelist[o]->d_name);
afl->syncing_case = next_min_accept;
next_min_accept++;
o--;