AFLplusplus / Grammar-Mutator

A grammar-based custom mutator for AFL++
Apache License 2.0
234 stars 15 forks source link

A question about data length #30

Closed DuckRui closed 3 years ago

DuckRui commented 3 years ago

Hi,I had a problem when I using Grammar-Mutator. I want define a long hex in my setup file, like this image

But when I use it in afl++, the program ran there will meet a bug, like this image I change the code to printf the "ret". In normal ,the "ret" should be 1. But in my program "ret" is 0, like this image As "ret" is 0, the program will not run in Grammar-Mutator mode. So can you help me? Thank you very much.

DuckRui commented 3 years ago

I seem know the reason. The real reason is hex datas have range from "\u0000"-"\u007f", So if I use data like "\u0080" will report error.

h1994st commented 3 years ago

Busy during the weekday. Just got a chance to look at this issue.

It should be a parsing issue as noted by you (see af_custom_queue_get in grammar_mutator.c).

It seems you have identified the reason. I will close this issue then. Feel free to reopen it if the issue still exists.