-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leaks #7
Comments
Thank you very much for looking into this, I've not had the change to learn how to use valgrind much, but I think I'll look into it now. Here's what I'm getting:
18, 728 bytes lost, uh oh! 😮 |
Fixed |
@cameronswinoga I am still seeing the error present. With a given input file the |
@rwhitworth I'm not sure what that file you attached was supposed to be, but I'm seeing it as garbled on my end.
|
The file was generated by American Fuzzy Lop (afl-fuzz) and it is binary, you're right. You may have more luck understanding the problem by checking #8. Looks like a logic error that is fairly easy to protect against, but I'm not certain if this is the best way to handle it. May be worth enforcing ascii input to the program by using isdigit or isalpha, or whatever method makes the most sense. |
ASCII input is already done by only adding the input to the command structure if the character is one of |
Line 77 of optimize.c seems to have an off by one error, but I'm unable to determine how exactly. I think it is in
instructions->instruction[i + (*position)]
, asclearLoop
is already protected by the for loop iterator. Perhaps a check oninstructions->size >= 3
should be done prior to the for loop?Here is the code in question:
And this is the valgrind output that leads me to believe there is an error
The text was updated successfully, but these errors were encountered: