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

Recursive symlink crashes spf #109

Closed
anta40 opened this issue May 10, 2024 · 1 comment
Closed

Recursive symlink crashes spf #109

anta40 opened this issue May 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@anta40
Copy link

anta40 commented May 10, 2024

To Reproduce

  1. Create a recursive symlink, e.g ln -s blahblah blahblah
  2. Run spf, keep navigating until you found the directory
  3. Then spf crashes...
panic: runtime error: invalid memory address or nil pointer dereference━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┫1/3┣━┛┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
                                                                       [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x10d806d2a]

                                                                                                                                                 goroutine 125 [running
]:
  github.com/MHNightCat/superfile/internal.returnMetaData({{{0xc0000c8d88, 0x1, 0x1}, 0x8f, 0x0, 0x6}, {{0xc0001f8000, 0x7, 0x7}, 0x0}, ...})
                                                                                                                                                github.com/MHNightCat/s
uperfile/internal/function.go:288 +0x46a
                                        github.com/MHNightCat/superfile/internal.mainKey.func2()
                                                                                                        github.com/MHNightCat/superfile/internal/key_function.go:34 +0x
51
  created by github.com/MHNightCat/superfile/internal.mainKey in goroutine 1
                                                                                github.com/MHNightCat/superfile/internal/key_function.go:33 +0xa8a

Expected behavior
spf doesn't crash, unless the user decides to enter that directory. mc (Midnight Commander) does it.

System information (please complete the following information):

  • macOS Monterey (x64) 12.7.4
  • Superfile Version 1.1.2 (installed via Homebrew)
@anta40 anta40 added the bug Something isn't working label May 10, 2024
@yorukot
Copy link
Owner

yorukot commented May 10, 2024

@anta40 Hey, thanks for the report, I just fixed it: 6235c1d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants