[Forensics-changes] [yara] 64/407: Fix segfault in yara-python

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:28:10 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 9f7a17838c0408cd5db53d70042bfd9741f07ee1
Author: Victor Manuel Alvarez <vmalvarez at virustotal.com>
Date:   Wed Sep 24 23:42:45 2014 +0200

    Fix segfault in yara-python
---
 yara-python/yara-python.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/yara-python/yara-python.c b/yara-python/yara-python.c
index e62cfc0..07fc34c 100644
--- a/yara-python/yara-python.c
+++ b/yara-python/yara-python.c
@@ -1538,10 +1538,7 @@ static PyObject * yara_load(
     Py_BEGIN_ALLOW_THREADS
 
     if (rules != NULL)
-    {
-      rules->cur_rule = rules->rules->rules_list_head;
       error = yr_rules_load(filepath, &rules->rules);
-    }
     else
       error = ERROR_INSUFICIENT_MEMORY;
 
@@ -1551,6 +1548,7 @@ static PyObject * yara_load(
       return handle_error(error, filepath);
 
     external = rules->rules->externals_list_head;
+    rules->cur_rule = rules->rules->rules_list_head;
 
     if (!EXTERNAL_VARIABLE_IS_NULL(external))
       rules->externals = PyDict_New();

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