[Forensics-changes] [yara] 86/160: PE module: avoid off-by-one leading to segfault
Hilko Bengen
bengen at moszumanska.debian.org
Sat Jul 1 10:29:21 UTC 2017
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag v3.4.0
in repository yara.
commit b01eeabc315f6fe72731dfbef53ca741a38dffd3
Author: Hilko Bengen <bengen at hilluzination.de>
Date: Thu Apr 23 22:45:56 2015 +0200
PE module: avoid off-by-one leading to segfault
---
libyara/modules/pe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libyara/modules/pe.c b/libyara/modules/pe.c
index 354ea17..a306e5e 100644
--- a/libyara/modules/pe.c
+++ b/libyara/modules/pe.c
@@ -965,7 +965,7 @@ int pe_valid_dll_name(
const char* c = dll_name;
size_t l = 0;
- while (*c != '\0' && l < n)
+ while (l < n && *c != '\0')
{
if ((*c >= 'a' && *c <= 'z') ||
(*c >= 'A' && *c <= 'Z') ||
--
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