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

Limit the maximum resolve depth to prevent infinite loops #3896

Merged
merged 13 commits into from
Jul 13, 2023

Conversation

zhijian-pro
Copy link
Contributor

@zhijian-pro zhijian-pro commented Jul 12, 2023

test script

#!/bin/bash
set -e
rm -rf d
mkdir -p d
cd d
touch f
ln -s f symlink_1
for i in {1..50}; do
  ln -s symlink_$i symlink_$((i+1))
  ls symlink_$((i+1))
  cat symlink_$((i+1))
done```
ext4

symlink_2
symlink_3
symlink_4
symlink_5
symlink_6
symlink_7
symlink_8
symlink_9
symlink_10
symlink_11
symlink_12
symlink_13
symlink_14
symlink_15
symlink_16
symlink_17
symlink_18
symlink_19
symlink_20
symlink_21
symlink_22
symlink_23
symlink_24
symlink_25
symlink_26
symlink_27
symlink_28
symlink_29
symlink_30
symlink_31
symlink_32
symlink_33
symlink_34
symlink_35
symlink_36
symlink_37
symlink_38
symlink_39
symlink_40
ls: cannot access symlink_41: Too many levels of symbolic links


close #3894 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants