[Forensics-changes] [yara] 381/407: Fix some issues with latest changes in filemap functions in Windows
Hilko Bengen
bengen at moszumanska.debian.org
Sat Jul 1 10:28:47 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 a546391e939cb6c6d6d351585c0de8d3d4f0b8d9
Author: Victor M. Alvarez <plusvic at gmail.com>
Date: Thu Feb 5 12:55:53 2015 +0100
Fix some issues with latest changes in filemap functions in Windows
---
libyara/filemap.c | 8 ++++----
libyara/include/yara/filemap.h | 5 +++--
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/libyara/filemap.c b/libyara/filemap.c
index f02656e..c5f7bae 100755
--- a/libyara/filemap.c
+++ b/libyara/filemap.c
@@ -108,15 +108,15 @@ YR_API int yr_filemap_map_ex(
if (pmapped_file->file == INVALID_HANDLE_VALUE)
return ERROR_COULD_NOT_OPEN_FILE;
- LARGE_INTEGER size;
+ LARGE_INTEGER fs;
size_t file_size;
- if (GetFileSizeEx(pmapped_file->file, &size))
+ if (GetFileSizeEx(pmapped_file->file, &fs))
{
#ifdef _WIN64
- file_size = size.QuadPart;
+ file_size = fs.QuadPart;
#else
- file_size = size.LowPart;
+ file_size = fs.LowPart;
#endif
}
else
diff --git a/libyara/include/yara/filemap.h b/libyara/include/yara/filemap.h
index 11397f8..68f1268 100755
--- a/libyara/include/yara/filemap.h
+++ b/libyara/include/yara/filemap.h
@@ -19,10 +19,11 @@ limitations under the License.
#ifdef _WIN32
#include <windows.h>
-#define FILE_DESCRIPTOR HANDLE
+#define FILE_DESCRIPTOR HANDLE
+#define off_t int64_t
#else
#include <sys/types.h>
-#define FILE_DESCRIPTOR int
+#define FILE_DESCRIPTOR int
#endif
#include <stdlib.h>
--
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