[Forensics-changes] [yara] 322/407: Penalize spaces and newlines in strings

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:28:41 UTC 2017


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag v3.3.0
in repository yara.

commit da309b768497b3247237db5b86b6e7ead011aeea
Author: Victor Manuel Alvarez <vmalvarez at virustotal.com>
Date:   Wed Jan 7 11:15:33 2015 +0100

    Penalize spaces and newlines in strings
---
 libyara/atoms.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libyara/atoms.c b/libyara/atoms.c
index a5b3ace..60ea9ae 100644
--- a/libyara/atoms.c
+++ b/libyara/atoms.c
@@ -113,10 +113,10 @@ int _yr_atoms_quality(
 
   for (i = 0; i < atom_length; i++)
   {
-    if (atom[i] == 0x00 || atom[i] == 0xFF)
+    if (atom[i] == 0x00 || atom[i] == 0xFF || atom[i] == 0x20 ||
+        atom[i] == 0x0A || atom[i] == 0x0D)
     {
-      // Penalize common bytes like 0x00 and 0xFF, specially if they are
-      // in the first two positions.
+      // Penalize common bytes, specially if they are in the first two positions.
 
       switch(i)
       {

-- 
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