[Forensics-changes] [yara] 126/415: Fixed incorrect error handling in map_file

Hilko Bengen bengen at moszumanska.debian.org
Thu Apr 3 05:42:54 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 8f0f9b96c501ffb204cf969fdb9c3976328ac9b4
Author: Victor M. Alvarez <plusvic at gmail.com>
Date:   Tue Apr 24 15:16:28 2012 +0000

    Fixed incorrect error handling in map_file
---
 libyara/filemap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libyara/filemap.c b/libyara/filemap.c
index 969d884..25fe9ea 100755
--- a/libyara/filemap.c
+++ b/libyara/filemap.c
@@ -118,7 +118,7 @@ int map_file(const char* file_path, MAPPED_FILE* pmapped_file)
 	
 	pmapped_file->data = (unsigned char*) mmap(0, pmapped_file->size, PROT_READ, MAP_PRIVATE, pmapped_file->file, 0);
 
-	if (pmapped_file->data == NULL)
+	if (pmapped_file->data == MAP_FAILED)
 	{
 		close(pmapped_file->file);
 		return ERROR_COULD_NOT_MAP_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