[Forensics-changes] [yara] 162/368: Fix issue #397

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 3c74c9bc3a73de8b09a12ef1c43f7cbe72722c82
Author: Victor M. Alvarez <plusvic at gmail.com>
Date:   Fri Jan 29 11:16:03 2016 +0100

    Fix issue #397
---
 libyara/modules/magic.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libyara/modules/magic.c b/libyara/modules/magic.c
index 786fda6..246e39f 100644
--- a/libyara/modules/magic.c
+++ b/libyara/modules/magic.c
@@ -51,6 +51,9 @@ define_function(magic_mime_type)
         block->size);
   }
 
+  if (cached_mime_types[context->tidx] == NULL)
+    return_string(UNDEFINED);
+
   return_string((char*) cached_mime_types[context->tidx]);
 }
 
@@ -75,6 +78,9 @@ define_function(magic_type)
         block->size);
   }
 
+  if (cached_types[context->tidx] == NULL)
+    return_string(UNDEFINED);
+
   return_string((char*) cached_types[context->tidx]);
 }
 

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