[Forensics-changes] [yara] 130/192: Fix user after free bug

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:31:56 UTC 2017


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag v3.6.0
in repository yara.

commit 2d3b6d0b7b29bf2ca7040be1cb12d35ee9265688
Author: plusvic <plusvic at gmail.com>
Date:   Thu Mar 16 17:20:03 2017 +0100

    Fix user after free bug
---
 libyara/modules/pe.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/libyara/modules/pe.c b/libyara/modules/pe.c
index 73d40dd..000354d 100644
--- a/libyara/modules/pe.c
+++ b/libyara/modules/pe.c
@@ -2650,9 +2650,8 @@ int module_unload(
     dll = next_dll;
   }
 
-  yr_free(pe);
-
   func = pe->exported_dlls;
+
   while (func)
   {
     yr_free(func->name);
@@ -2660,5 +2659,8 @@ int module_unload(
     yr_free(func);
     func = next_func;
   }
+
+  yr_free(pe);
+
   return ERROR_SUCCESS;
 }

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