We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cddec11 commit 923368eCopy full SHA for 923368e
cli/yara.c
@@ -688,14 +688,15 @@ static int scan_dir(const char* dir, SCAN_OPTIONS* scan_opts)
688
de = readdir(dp);
689
continue;
690
}
691
- // If the directory entry is a symlink, check if it points to . and
692
- // skip it in that case.
+ // If the directory entry is a symlink, check if it points to . or .. and
+ // skip it in those cases.
693
else if (S_ISLNK(st.st_mode))
694
{
695
char buf[2];
696
int len = readlink(full_path, buf, sizeof(buf));
697
698
- if (len == 1 && buf[0] == '.')
+ if ((len == 1 && buf[0] == '.') ||
699
+ (len == 2 && buf[0] == '.' && buf[1] == '.'))
700
701
702
0 commit comments