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

Repository: don't crash accessing invalid pathinfo #443

Merged
merged 5 commits into from Jan 19, 2022

Commits on Jan 14, 2022

  1. fix: don't crash accessing invalid pathinfo

    When fs.Stat returns an error, pathinfo may be nil. In such situations
    the only safe response seems to be to return the error to the caller.
    
    Without this fix, accessing pathinfo.IsDir() below would lead to a crash
    dereferencing a nil pointer.
    
    This crash can be reproduced by trying to initialize a Git repo with an
    invalid path name.
    
    Also see: muesli/gitty#36
    muesli committed Jan 14, 2022
    Copy the full SHA
    8ceb0c1 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2022

  1. Copy the full SHA
    4490e7a View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    d440824 View commit details
    Browse the repository at this point in the history
  3. Repository: fix test

    mcuadros committed Jan 19, 2022
    Copy the full SHA
    f0051a3 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    4af1024 View commit details
    Browse the repository at this point in the history