mirror of
https://github.com/junegunn/fzf.git
synced 2026-08-05 23:48:36 +08:00
Skip symlinks targeting ancestors of walker root to prevent resource exhaustion
When --walker=follow is used, symlinks like Wine's z: -> / cause fzf to traverse the entire root filesystem. fastwalk's built-in loop detection only catches this on the second pass, but a single pass through / already causes severe CPU and memory exhaustion. This fix resolves each symlink-to-directory target to its absolute real path and skips it if it is an ancestor of (or equal to) the walker root. Close #4710
This commit is contained in:
@@ -27,6 +27,7 @@ CHANGELOG
|
||||
- With the reduced per-entry cost, the cache now has broader coverage.
|
||||
- fish: Improved command history (CTRL-R) (#4703) (@bitraid)
|
||||
- Bug fixes
|
||||
- `--walker=follow` no longer follows symlinks whose target is an ancestor of the walker root, avoiding severe resource exhaustion when a symlink points outside the tree (e.g. Wine's `z:` → `/`) (#4710)
|
||||
- Fixed AWK tokenizer not treating a new line character as whitespace
|
||||
- Fixed `--{accept,with}-nth` removing trailing whitespaces with a non-default `--delimiter`
|
||||
- Fixed OSC8 hyperlinks being mangled when the URL contains unicode characters (#4707)
|
||||
|
||||
Reference in New Issue
Block a user