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

Fix crash when /etc/{fstab,hosts} is unreadable. #574

Closed
wants to merge 1 commit into from
Closed

Fix crash when /etc/{fstab,hosts} is unreadable. #574

wants to merge 1 commit into from

Conversation

kvs
Copy link
Contributor

@kvs kvs commented Feb 15, 2013

My /etc/fstab is 0700, and fish crashed when tab-completing hostnames due to this.

@ridiculousfish
Copy link
Member

The fix looks fine, but does fish actually crash? It shouldn't crash, even if a completion returns garbage.

@kvs
Copy link
Contributor Author

kvs commented Feb 16, 2013

Unfortunately, it does. In the excerpt below, after typing 'ssh wor' I pressed , and it died.

% ssh worfish: An error occurred while redirecting file '/etc/fstab'
open: Permission denied
Assertion failed: (element.get() != NULL), function push_back, file io.cpp, line 211.
zsh: abort fish

@ridiculousfish
Copy link
Member

Ok, the crash occurs when a redirecting to a function fails, e.g. sgrep < /not/a/file.

@ridiculousfish
Copy link
Member

The crash should be fixed as c9b4163

@ridiculousfish
Copy link
Member

I think your fix is good to include as well, so I merged it with rebase as 286bef5
Thanks!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants