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

Possible null reference exception in DiffService #1240

grokys opened this Issue Sep 27, 2017 · 0 comments


None yet
1 participant

grokys commented Sep 27, 2017

At this line:

return DiffUtilities.ParseFragment(patch).ToList();

patch can be null as gitClient.Compare can return null. This should be handled, as well as probably other places.

@grokys grokys added the bug label Sep 27, 2017

@meaghanlewis meaghanlewis added this to Low Priority in BUGS Dec 2, 2017

@grokys grokys self-assigned this Dec 11, 2017

grokys added a commit that referenced this issue Dec 12, 2017

Avoid possible NRE in DiffService.
`GitClient.Compare` and `GitClient.CompareWith` can return null if one of the requested commits can't be found. Don't try to pass this null to `ParseFragment` . Also add a null guard to `ParseFragment` to make this clearer.

Fixes #1240

@grokys grokys moved this from Low Priority to In Progress in BUGS Dec 12, 2017

BUGS automation moved this from In Progress to Done Dec 18, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment