mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-15 11:28:08 +00:00
fix UAF in -F
This commit is contained in:
@ -589,8 +589,6 @@ void read_foreign_testcases(afl_state_t *afl, int first) {
|
|||||||
u8 *fn2 =
|
u8 *fn2 =
|
||||||
alloc_printf("%s/%s", afl->foreign_syncs[iter].dir, nl[i]->d_name);
|
alloc_printf("%s/%s", afl->foreign_syncs[iter].dir, nl[i]->d_name);
|
||||||
|
|
||||||
free(nl[i]); /* not tracked */
|
|
||||||
|
|
||||||
if (unlikely(lstat(fn2, &st) || access(fn2, R_OK))) {
|
if (unlikely(lstat(fn2, &st) || access(fn2, R_OK))) {
|
||||||
|
|
||||||
if (first) PFATAL("Unable to access '%s'", fn2);
|
if (first) PFATAL("Unable to access '%s'", fn2);
|
||||||
@ -670,6 +668,12 @@ void read_foreign_testcases(afl_state_t *afl, int first) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < (u32)nl_cnt; ++i) {
|
||||||
|
|
||||||
|
free(nl[i]); /* not tracked */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
free(nl); /* not tracked */
|
free(nl); /* not tracked */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user