Open tuturu-tech opened 10 months ago
ABI values are serialized here, I'd check this out: https://github.com/crytic/medusa/blob/e471c52460ae9a37f5e168a96cbb0fbbe4db33a0/fuzzing/valuegeneration/abi_values.go#L534C13-L534C13
Solidity strings are just byte arrays with a given length, so \x00 should be retained, but it's probably lost in a []byte->string conversion in Go somewhere here, or not output correctly in the first place.
Note for any dev looking to tackle this in a PR: You'll want to add a unit test for this case to ensure this isn't ever broken again.
Contract and corpus for reproducing the issue: empty-string-reproduction.zip
Medusa seems to save an empty string in the corpus for a "0x00" string input, which makes correctly parsing the corpus input values more difficult.
Example property:
Example corpus file: