[Forensics-changes] [yara] 354/407: Fix crash on warnings when no compiler callback has been set.

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:28:44 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 81ec39e68050f82dc8ea85a7850b10c39e430d4e
Author: Hilko Bengen <bengen at hilluzination.de>
Date:   Tue Jan 27 00:27:48 2015 +0100

    Fix crash on warnings when no compiler callback has been set.
---
 libyara/lexer.l | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libyara/lexer.l b/libyara/lexer.l
index 7b9e283..89aec7d 100644
--- a/libyara/lexer.l
+++ b/libyara/lexer.l
@@ -598,6 +598,9 @@ void yywarning(
   YR_COMPILER* compiler = yyget_extra(yyscanner);
   char* file_name;
 
+  if (compiler->callback == NULL)
+    return;
+
   if (compiler->file_name_stack_ptr > 0)
     file_name = compiler->file_name_stack[compiler->file_name_stack_ptr - 1];
   else

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