Skip to content
This repository was archived by the owner on Dec 2, 2026. It is now read-only.
This repository was archived by the owner on Dec 2, 2026. It is now read-only.

Segmentation fault: 11 on Tag.list(...) #1120

Closed

Description

@frederikbrinck

Calling Tag.list() with a Remote object throws a segmentation fault. Replicate with the code below:

return git.Remote.lookup(remoteRepository, 'origin')
    .then((remoteResult) => { return remoteResult; }, 
          (error) => { return git.Remote.create(remoteRepository, 'origin', remoteWrite) })
    .then((remoteResult) => {
        return git.Tag.list(remoteResult);
// ouch...

Running nodegit 0.15.1, npm 3.10.7, node v6.4.0 and node-pre-gyp 0.6.18.

Activity

  1. maxkorp commented on Sep 14, 2016

    @maxkorp
    Collaborator

    Tag.list takes a Repository object, not a Remote. What precisely are you aiming to do here, view the state of the tags on the remote?

  2. frederikbrinck commented on Sep 15, 2016

    @frederikbrinck
    Author

    I figured that it took a Repository and I managed to do what I intended. However, I suppose it is a vulnerability that Tag.list does not check the object type and just proceeds, throwing a segmentation error to the developer. Shouldn't this error be caught instead and handled by nodegit?

  3. maxkorp commented on Sep 15, 2016

    @maxkorp
    Collaborator

    Yes, but this is not specific to this case. Currently, our type checking between a js object, and a nodegit object isn't there. We're just able to check that whatever was passed in is an object.
    I'll make an issue for that (as it is an issue), but it's far more generic, and requires a fix in our C++ templates. A manual solution definitely won't do.

  4. maxkorp commented on Sep 15, 2016

    @maxkorp
    Collaborator

    Closing this in lieu of that issue.

  5. frederikbrinck commented on Sep 15, 2016

    @frederikbrinck
    Author

    Thanks for the clarification.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions