[Forensics-changes] [yara] 69/368: Fix bug introduced in f502bdf4903545cfc75dfe15bed650138da53a81

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:30:12 UTC 2017


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

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

commit db099d81c3b5b65eddb9773bbdf56b06cbd8706f
Author: Victor M. Alvarez <plusvic at gmail.com>
Date:   Wed Sep 23 14:51:15 2015 +0200

    Fix bug introduced in f502bdf4903545cfc75dfe15bed650138da53a81
---
 libyara/arena.c              | 6 +++---
 libyara/include/yara/arena.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/libyara/arena.c b/libyara/arena.c
index b577597..6ae0833 100644
--- a/libyara/arena.c
+++ b/libyara/arena.c
@@ -900,7 +900,7 @@ int yr_arena_load_stream(
   YR_ARENA* new_arena;
   ARENA_FILE_HEADER header;
 
-  int32_t reloc_offset;
+  uint32_t reloc_offset;
   uint8_t** reloc_address;
   uint8_t* reloc_target;
 
@@ -944,7 +944,7 @@ int yr_arena_load_stream(
     return ERROR_CORRUPT_FILE;
   }
 
-  while (reloc_offset != -1)
+  while (reloc_offset != 0xFFFFFFFF)
   {
     if (reloc_offset > header.size - sizeof(uint8_t*))
     {
@@ -997,7 +997,7 @@ int yr_arena_save_stream(
   YR_RELOC* reloc;
   ARENA_FILE_HEADER header;
 
-  int32_t end_marker = -1;
+  uint32_t end_marker = 0xFFFFFFFF;
   uint8_t** reloc_address;
   uint8_t* reloc_target;
 
diff --git a/libyara/include/yara/arena.h b/libyara/include/yara/arena.h
index ddb5f0f..12e57ae 100644
--- a/libyara/include/yara/arena.h
+++ b/libyara/include/yara/arena.h
@@ -31,7 +31,7 @@ limitations under the License.
 
 typedef struct _YR_RELOC
 {
-  size_t offset;
+  uint32_t offset;
   struct _YR_RELOC* next;
 
 } YR_RELOC;

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