8000 AccessViolation when fetching an invalid http remote without slash · Issue #701 · libgit2/libgit2sharp · GitHub
[go: up one dir, main page]

Skip to content
AccessViolation when fetching an invalid http remote without slash #701
Closed
@Yogu

Description

@Yogu

A fetch operatio crashes in a repo with the following configuration (v 0.17):

[core]
bare = false
repositoryformatversion = 0
filemode = false
symlinks = false
ignorecase = true
logallrefupdates = true
[remote "origin"]
url = http://localhost

fetch = +refs/heads/*:refs/remotes/origin/*
fetch = +refs/notes/*:refs/notes/*

Of course it's not a valid url, but an AccessViolationException is very bad(tm) because it can not be caught.

AccessViolationException

   at LibGit2Sharp.Core.NativeMethods.git_remote_fetch(RemoteSafeHandle remote, SignatureSafeHandle signature, String log_message)
   at LibGit2Sharp.Core.Proxy.git_remote_fetch(RemoteSafeHandle remote, Signature signature, String logMessage) in c:\path\to\libgit2sharp\LibGit2Sharp\Core\Proxy.cs:line 1828
   at LibGit2Sharp.Network.DoFetch(RemoteSafeHandle remoteHandle, FetchOptions options, Signature signature, String logMessage) in c:\path\to\libgit2sharp\LibGit2Sharp\Network.cs:line 109
   at LibGit2Sharp.Network.Fetch(Remote remote, FetchOptions options, Signature signature, String logMessage) in c:\path\to\libgit2sharp\LibGit2Sharp\Network.cs:line 127

Can you reproduce this?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0