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

Don't free the given repo on error in getReferences and getRemotes #1995

Merged
merged 3 commits into from
Apr 12, 2024

Conversation

zawata
Copy link
Contributor

@zawata zawata commented Apr 9, 2024

This fixes a crash that occurs on windows when trying to run Repository.getReferences() on a repo with refs that exceed the path-length limit in libgit2 more than once.

I don't know how else to trigger this issue so I can't really add a test for it.

@zawata zawata force-pushed the fix/dontFreeRepoOnRefError branch from 64d4adb to 112e142 Compare April 9, 2024 21:16
zawata and others added 3 commits April 12, 2024 12:33
we didn't create the repo so we can't be the ones to free it
spawning cmd files without shell: true wasn't really allowed before, but not it's expressly disallowed because of a recent vulnerability reported to node
@zawata zawata force-pushed the fix/dontFreeRepoOnRefError branch from 674dd4c to c12c5a4 Compare April 12, 2024 19:33
@ianhattendorf ianhattendorf merged commit 3c73d24 into nodegit:master Apr 12, 2024
10 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants