"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "sanitizers.c" between
honggfuzz-2.4.tar.gz and honggfuzz-2.5.tar.gz

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

sanitizers.c  (honggfuzz-2.4):sanitizers.c  (honggfuzz-2.5)
skipping to change at line 134 skipping to change at line 134
return pid; return pid;
} }
size_t sanitizers_parseReport(run_t* run, pid_t pid, funcs_t* funcs, uint64_t* p c, size_t sanitizers_parseReport(run_t* run, pid_t pid, funcs_t* funcs, uint64_t* p c,
uint64_t* crashAddr, char description[HF_STR_LEN]) { uint64_t* crashAddr, char description[HF_STR_LEN]) {
char crashReport[PATH_MAX]; char crashReport[PATH_MAX];
const char* crashReportCpy = crashReport; const char* crashReportCpy = crashReport;
/* Under Linux the crash is seen in TID, but the sanitizer report is created for PID */ /* Under Linux the crash is seen in TID, but the sanitizer report is created for PID */
pid = sanitizers_PidForTid(pid); pid = sanitizers_PidForTid(pid);
snprintf( snprintf(crashReport, sizeof(crashReport), "%s/%s.%d", run->global->io.workD
crashReport, sizeof(crashReport), "%s/%s.%d", run->global->io.workDir, k ir, kLOGPREFIX,
LOGPREFIX, pid); (int)pid);
FILE* fReport = fopen(crashReport, "rb"); FILE* fReport = fopen(crashReport, "rb");
if (fReport == NULL) { if (fReport == NULL) {
PLOG_D("fopen('%s', 'rb')", crashReport); PLOG_D("fopen('%s', 'rb')", crashReport);
return 0; return 0;
} }
defer { defer {
fclose(fReport); fclose(fReport);
if (run->global->sanitizer.del_report) { if (run->global->sanitizer.del_report) {
unlink(crashReportCpy); unlink(crashReportCpy);
skipping to change at line 172 skipping to change at line 172
/* First step is to identify header */ /* First step is to identify header */
if (!headerFound) { if (!headerFound) {
int reportpid = 0; int reportpid = 0;
if (sscanf(lineptr, "==%d==ERROR: ", &reportpid) != 1) { if (sscanf(lineptr, "==%d==ERROR: ", &reportpid) != 1) {
continue; continue;
} }
if (reportpid != pid) { if (reportpid != pid) {
LOG_W( LOG_W(
"SAN report found in '%s', but its PID:%d is different from the needed PID:%d", "SAN report found in '%s', but its PID:%d is different from the needed PID:%d",
crashReport, reportpid, pid); crashReport, reportpid, (int)pid);
break; break;
} }
headerFound = true; headerFound = true;
sscanf(lineptr, sscanf(lineptr,
"==%*d==ERROR: %*[^:]: %*[^ ] on address 0x%" PRIx64 " at pc 0x% " PRIx64, crashAddr, "==%*d==ERROR: %*[^:]: %*[^ ] on address 0x%" PRIx64 " at pc 0x% " PRIx64, crashAddr,
pc); pc);
sscanf(lineptr, sscanf(lineptr,
"==%*d==ERROR: %*[^:]: %*[^ ] on %*s address 0x%" PRIx64 " (pc 0 x%" PRIx64, "==%*d==ERROR: %*[^:]: %*[^ ] on %*s address 0x%" PRIx64 " (pc 0 x%" PRIx64,
crashAddr, pc); crashAddr, pc);
sscanf(lineptr, "==%*d==ERROR: %" HF_XSTR(HF_STR_LEN_MINUS_1) "[^\n] ", description); sscanf(lineptr, "==%*d==ERROR: %" HF_XSTR(HF_STR_LEN_MINUS_1) "[^\n] ", description);
 End of changes. 2 change blocks. 
4 lines changed or deleted 4 lines changed or added

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