[Forensics-changes] [yara] 384/415: Fix issue #118
Hilko Bengen
bengen at moszumanska.debian.org
Thu Apr 3 05:43:26 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 fd03aab17970b1b053efd186a9c9062941813bbe
Author: Victor M. Alvarez <plusvic at gmail.com>
Date: Tue Jan 28 11:49:36 2014 +0100
Fix issue #118
---
libyara/arena.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/libyara/arena.c b/libyara/arena.c
index c170af1..9e9bfc4 100644
--- a/libyara/arena.c
+++ b/libyara/arena.c
@@ -37,9 +37,12 @@ from files.
#include "yara.h"
-#define ARENA_FILE_VERSION 1
+#define ARENA_FILE_VERSION 2
+#pragma pack(push)
+#pragma pack(1)
+
typedef struct _ARENA_FILE_HEADER
{
char magic[4];
@@ -48,6 +51,8 @@ typedef struct _ARENA_FILE_HEADER
} ARENA_FILE_HEADER;
+#pragma pop()
+
#define free_space(page) \
((page)->size - (page)->used)
@@ -871,7 +876,7 @@ int yr_arena_save(
// Only coalesced arenas can be saved.
assert(arena->flags & ARENA_FLAGS_COALESCED);
- fh = fopen(filename, "w");
+ fh = fopen(filename, "wb");
if (fh == NULL)
return ERROR_COULD_NOT_OPEN_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