Skip to content
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

patch.c : self.patch is checked after it is used #757

Closed
brandonio21 opened this issue Dec 6, 2017 · 0 comments
Closed

patch.c : self.patch is checked after it is used #757

brandonio21 opened this issue Dec 6, 2017 · 0 comments

Comments

@brandonio21
Copy link
Contributor

brandonio21 commented Dec 6, 2017

In

pygit2/src/patch.c

Lines 190 to 193 in a96da22

err = git_patch_to_buf(&buf, self->patch);
if (!self->patch)
Py_RETURN_NONE;
, self->patch is checked to exist after it is used, potentially causing errors.

This should be fixed (a simple lineswap)

@jdavid jdavid closed this as completed in 91dfaf2 Dec 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant