Skip to content

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

@brandonio21

Description

@brandonio21

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions