[Forensics-changes] [yara] 69/415: Fixed minor problems with proc.c in Windows

Hilko Bengen bengen at moszumanska.debian.org
Thu Apr 3 05:42:46 UTC 2014


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

bengen pushed a commit to branch debian
in repository yara.

commit 12cc9cf87cadb71ad3ce92aac963a6f37a70568f
Author: Victor M. Alvarez <plusvic at gmail.com>
Date:   Tue Jan 18 16:30:39 2011 +0000

    Fixed minor problems with proc.c in Windows
---
 libyara/proc.c                 | 9 +++++++--
 windows/libyara/libyara.vcproj | 4 ++++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/libyara/proc.c b/libyara/proc.c
index 6bb4637..f9439a8 100644
--- a/libyara/proc.c
+++ b/libyara/proc.c
@@ -14,11 +14,12 @@ GNU General Public License for more details.
 
 */
 
-#include "proc.h"
+
 
 #ifdef WIN32
 
 #include <windows.h>
+#include "proc.h"
 
 int get_process_memory(int pid, MEMORY_BLOCK** first_block)
 {
@@ -36,6 +37,7 @@ int get_process_memory(int pid, MEMORY_BLOCK** first_block)
     TOKEN_PRIVILEGES tokenPriv;
     LUID luidDebug; 
     HANDLE hProcess;
+	HANDLE hToken;
     
     if( OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &hToken) && 
         LookupPrivilegeValue(NULL, SE_DEBUG_NAME, &luidDebug)) 
@@ -66,7 +68,7 @@ int get_process_memory(int pid, MEMORY_BLOCK** first_block)
          {         
              if (mbi.State == MEM_COMMIT && mbi.Protect != PAGE_NOACCESS)
              {    
-                 data = yr_malloc(mbi.RegionSize);
+                 data = (unsigned char*) yr_malloc(mbi.RegionSize);
              
                  if (data == NULL)
                      return ERROR_INSUFICIENT_MEMORY;
@@ -115,6 +117,8 @@ int get_process_memory(int pid, MEMORY_BLOCK** first_block)
 #include <sys/ptrace.h>
 #include <sys/wait.h>  
 
+#include "proc.h"
+
 #ifdef __MACH__
 
 #include <mach/mach.h>
@@ -203,6 +207,7 @@ int get_process_memory(pid_t pid, MEMORY_BLOCK** first_block)
 #else
 
 #include <errno.h>
+#include "proc.h"
 
 int get_process_memory(pid_t pid, MEMORY_BLOCK** first_block)
 {
diff --git a/windows/libyara/libyara.vcproj b/windows/libyara/libyara.vcproj
index a907985..af9a9f3 100644
--- a/windows/libyara/libyara.vcproj
+++ b/windows/libyara/libyara.vcproj
@@ -184,6 +184,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\..\libyara\proc.c"
+				>
+			</File>
+			<File
 				RelativePath="..\..\libyara\scan.c"
 				>
 			</File>

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