DynamoRIO / dynamorio

Dynamic Instrumentation Tool Platform
Other
2.66k stars 562 forks source link

Client argv not NULL terminated #5423

Open algrant-arm opened 2 years ago

algrant-arm commented 2 years ago

Docs say "The client's options are passed directly to its dr_client_main() initialization routine, in the same manner as arguments are passed to a regular application's main() routine". The C standard says that argv must be NULL terminated, but DR fails to set this up, so option parsers that rely on this will crash.

Looks like the fix is in parse_option_array. The free in free_option_array will also need changing.

bete0 commented 2 years ago

Would you like to send out a PR with that fix?