Fix CHECK failure in libosi-allocation-tracker fuzzer
If the allocatior had not been initialized prior to a call to
allocation_tracker_notify_alloc, the function would immediately
return the provided pointer, but not track it (as the tracker is not
initialized). On fuzzer loop teardown, allocation_tracker_notify_free
is called, cannot find the pointer/id pair in its map, and asserts.
Test: Ran compiled fuzzer with crashfile before and after change to
verify crash had been fixed
(`./libosi_fuzz_allocation_tracker ./corpus/ -runs=0`)
Signed-off-by:
Michael Ensing <michael.ensing@leviathansecurity.com>
Change-Id: I42e2759aa6efb9b6733509e298a552600e874f82
Loading
Please register or sign in to comment