[Forensics-changes] [yara] 241/368: Removed exclusion of period-prefixed directories in recursive directory scan
Hilko Bengen
bengen at moszumanska.debian.org
Sat Jul 1 10:30:43 UTC 2017
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag v3.5.0
in repository yara.
commit 32aee52dabb29a9270c0c055d14cf87f3796d8d5
Author: James Allman-Talbot <j.allmantalbot at gmail.com>
Date: Tue Mar 22 11:15:07 2016 +0000
Removed exclusion of period-prefixed directories in recursive directory scan
---
yara.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/yara.c b/yara.c
index 8560332..838433e 100644
--- a/yara.c
+++ b/yara.c
@@ -318,7 +318,7 @@ void scan_dir(
{
file_queue_put(full_path);
}
- else if (recursive && FindFileData.cFileName[0] != '.' )
+ else if (recursive && strcmp(FindFileData.cFileName, ".") != 0 && strcmp(FindFileData.cFileName, "..") != 0)
{
scan_dir(full_path, recursive, start_time, rules, callback);
}
@@ -374,7 +374,8 @@ void scan_dir(
else if(recursive &&
S_ISDIR(st.st_mode) &&
!S_ISLNK(st.st_mode) &&
- de->d_name[0] != '.')
+ strcmp(de->d_name, ".") != 0 &&
+ strcmp(de->d_name, "..") != 0)
{
scan_dir(full_path, recursive, start_time, rules, callback);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/yara.git
More information about the forensics-changes
mailing list