[Forensics-changes] [yara] 257/407: Fix bug in PE module

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:28:32 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 a7b6dfe3808f74e9c24ec8071cb8f3f9b58ed464
Author: Victor M. Alvarez <plusvic at gmail.com>
Date:   Fri Dec 19 11:51:44 2014 +0100

    Fix bug in PE module
---
 libyara/modules/pe.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libyara/modules/pe.c b/libyara/modules/pe.c
index 0e2dee0..d607814 100644
--- a/libyara/modules/pe.c
+++ b/libyara/modules/pe.c
@@ -625,7 +625,7 @@ IMPORTED_FUNCTION* pe_parse_import_descriptor(
           {
             name = (char *) yr_strndup(
                 (char*) import->Name,
-                max(available_space(pe, import->Name), 512));
+                min(available_space(pe, import->Name), 512));
           }
         }
       }
@@ -678,7 +678,7 @@ IMPORTED_FUNCTION* pe_parse_import_descriptor(
           {
             name = (char *) yr_strndup(
                 (char*) import->Name,
-                max(available_space(pe, import->Name), 512));
+                min(available_space(pe, import->Name), 512));
           }
         }
       }

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