"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "posix/arch.c" between
honggfuzz-2.1.tar.gz and honggfuzz-2.2.tar.gz

About: honggfuzz is a security oriented, feedback-driven, evolutionary, easy-to-use fuzzer with powerful analysis options.

arch.c  (honggfuzz-2.1):arch.c  (honggfuzz-2.2)
skipping to change at line 142 skipping to change at line 142
* to always save (timestamp will be added to the filename) * to always save (timestamp will be added to the filename)
*/ */
bool saveUnique = run->global->io.saveUnique; bool saveUnique = run->global->io.saveUnique;
if (saveUnique && (funcCnt == 0)) { if (saveUnique && (funcCnt == 0)) {
saveUnique = false; saveUnique = false;
} }
/* If dry run mode, copy file with same name into workspace */ /* If dry run mode, copy file with same name into workspace */
if (run->global->mutate.mutationsPerRun == 0U && run->global->cfg.useVerifie r) { if (run->global->mutate.mutationsPerRun == 0U && run->global->cfg.useVerifie r) {
snprintf(run->crashFileName, sizeof(run->crashFileName), "%s/%s", run->g lobal->io.crashDir, snprintf(run->crashFileName, sizeof(run->crashFileName), "%s/%s", run->g lobal->io.crashDir,
run->origFileName); run->dynfile->path);
} else if (saveUnique) { } else if (saveUnique) {
snprintf(run->crashFileName, sizeof(run->crashFileName), snprintf(run->crashFileName, sizeof(run->crashFileName),
"%s/%s.PC.%" PRIx64 ".STACK.%" PRIx64 ".ADDR.%" PRIx64 ".%s", run->g lobal->io.crashDir, "%s/%s.PC.%" PRIx64 ".STACK.%" PRIx64 ".ADDR.%" PRIx64 ".%s", run->g lobal->io.crashDir,
util_sigName(termsig), pc, run->backtrace, crashAddr, run->global->i o.fileExtn); util_sigName(termsig), pc, run->backtrace, crashAddr, run->global->i o.fileExtn);
} else { } else {
char localtmstr[HF_STR_LEN]; char localtmstr[HF_STR_LEN];
util_getLocalTime("%F.%H:%M:%S", localtmstr, sizeof(localtmstr), time(NU LL)); util_getLocalTime("%F.%H:%M:%S", localtmstr, sizeof(localtmstr), time(NU LL));
snprintf(run->crashFileName, sizeof(run->crashFileName), snprintf(run->crashFileName, sizeof(run->crashFileName),
"%s/%s.PC.%" PRIx64 ".STACK.%" PRIx64 ".ADDR.%" PRIx64 ".%s.%d.%s", "%s/%s.PC.%" PRIx64 ".STACK.%" PRIx64 ".ADDR.%" PRIx64 ".%s.%d.%s",
run->global->io.crashDir, util_sigName(termsig), pc, run->backtrace, crashAddr, run->global->io.crashDir, util_sigName(termsig), pc, run->backtrace, crashAddr,
skipping to change at line 170 skipping to change at line 170
return; return;
} }
LOG_I("Ok, that's interesting, saving input '%s'", run->crashFileName); LOG_I("Ok, that's interesting, saving input '%s'", run->crashFileName);
ATOMIC_POST_INC(run->global->cnts.crashesCnt); ATOMIC_POST_INC(run->global->cnts.crashesCnt);
ATOMIC_POST_INC(run->global->cnts.uniqueCrashesCnt); ATOMIC_POST_INC(run->global->cnts.uniqueCrashesCnt);
/* If unique crash found, reset dynFile counter */ /* If unique crash found, reset dynFile counter */
ATOMIC_CLEAR(run->global->cfg.dynFileIterExpire); ATOMIC_CLEAR(run->global->cfg.dynFileIterExpire);
if (files_writeBufToFile(run->crashFileName, run->dynamicFile, run->dynamicF ileSz, if (files_writeBufToFile(run->crashFileName, run->dynfile->data, run->dynfil e->size,
O_CREAT | O_EXCL | O_WRONLY) == false) { O_CREAT | O_EXCL | O_WRONLY) == false) {
LOG_E("Couldn't save crash to '%s'", run->crashFileName); LOG_E("Couldn't save crash to '%s'", run->crashFileName);
} }
report_appendReport(pid, run, funcs, funcCnt, pc, crashAddr, termsig, "", de scription); report_appendReport(pid, run, funcs, funcCnt, pc, crashAddr, termsig, "", de scription);
} }
pid_t arch_fork(run_t* fuzzer HF_ATTR_UNUSED) { pid_t arch_fork(run_t* fuzzer HF_ATTR_UNUSED) {
return fork(); return fork();
} }
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)