[Forensics-changes] [yara] 163/368: Fix regression introduced in #369

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:30:23 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 52dd72e05afe4a878f8bd5000e122247058fc751
Author: Victor Manuel Alvarez <vmalvarez at virustotal.com>
Date:   Sun Jan 31 22:51:50 2016 +0100

    Fix regression introduced in #369
    
    Anonymous strings were being mistakenly reported as duplicate strings.
---
 libyara/parser.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/libyara/parser.c b/libyara/parser.c
index e533cc1..c493c4d 100644
--- a/libyara/parser.c
+++ b/libyara/parser.c
@@ -670,14 +670,17 @@ YR_STRING* yr_parser_reduce_string_declaration(
       goto _exit;
   }
 
-  compiler->last_result = yr_hash_table_add(
+  if (!STRING_IS_ANONYMOUS(string))
+  {
+    compiler->last_result = yr_hash_table_add(
       compiler->strings_table,
       identifier,
       NULL,
       string);
 
-  if (compiler->last_result != ERROR_SUCCESS)
-    goto _exit;
+    if (compiler->last_result != ERROR_SUCCESS)
+      goto _exit;  
+  }
 
   if (min_atom_quality < 3 && compiler->callback != NULL)
   {

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