-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Make ParsePatch more robust #17573
Make ParsePatch more robust #17573
Conversation
- Handle some possible but non-likely edge-cases of ParsePatch whereby it was possible that it could crash. - Tests are added and were the only 2 cases I could find.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apologies for the miscount
What miscount? |
I am responsible for the original miscount of characters that leads to this patch |
Ah got it, no worries. It was only after plugging in some values to see how it handled "ambitious" values it panicked, otherwise I wouldn't have seen it as well. |
@Gusted thanks for this PR (and all the other ones recently), could you send this as a backport to 1.15.x? Also, are you on our discord? I have a question I'd like to ask. |
- Backport of go-gitea#17573
it was possible that it could crash.