mrash / afl-cov

Produce code coverage results with gcov from afl-fuzz test cases
GNU General Public License v2.0
465 stars 83 forks source link

erroneous detection of executables with code coverage support #27

Closed umlaeute closed 8 years ago

umlaeute commented 8 years ago

while trying to use afl-cov to test a dlopen()ed library, I think i discovered a small bug in the check for properly providing instrumented executables.

namely the break in L894 should be indented to the inner if.

reasoning

the coverage-cmd might contain multiple executables, with only one of them being instrumented. the current test will stop after checking the first word that is also an executable, and if this one is not instrumented, found_code_cov_binary will stay False, thus leading to early abort.

i'm not providing a PR, given that the fix is trivial and i'm not sure whether i'm actually right.

mrash commented 8 years ago

Fixed in 9f884494 thanks.