[Forensics-changes] [yara] 148/160: Rename some ELF segment's fields to match naming convention used in PE module

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:29:27 UTC 2017


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

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

commit c9ee8fc8e3a825cc42e5415a8c18f2743852113a
Author: Victor M. Alvarez <plusvic at gmail.com>
Date:   Thu Jun 4 18:50:07 2015 +0200

    Rename some ELF segment's fields to match naming convention used in PE module
---
 libyara/modules/elf.c | 31 ++++++++++++++++++++-----------
 1 file changed, 20 insertions(+), 11 deletions(-)

diff --git a/libyara/modules/elf.c b/libyara/modules/elf.c
index 8a5b248..969e1cd 100644
--- a/libyara/modules/elf.c
+++ b/libyara/modules/elf.c
@@ -162,14 +162,23 @@ void parse_elf_header_##bits(                                                  \
                                                                                \
     for (int i = 0; i < elf->ph_entry_count; i++)                              \
     {                                                                          \
-      set_integer(segment->type, elf_obj, "segments[%i].type", i);             \
-      set_integer(segment->flags, elf_obj, "segments[%i].flags", i);           \
-      set_integer(segment->offset, elf_obj, "segments[%i].offset", i);         \
-      set_integer(segment->virt_addr, elf_obj, "segments[%i].virt_addr", i);   \
-      set_integer(segment->phys_addr, elf_obj, "segments[%i].phys_addr", i);   \
-      set_integer(segment->file_size, elf_obj, "segments[%i].file_size", i);   \
-      set_integer(segment->mem_size, elf_obj, "segments[%i].mem_size", i);     \
-      set_integer(segment->alignment, elf_obj, "segments[%i].alignment", i);   \
+      set_integer(                                                             \
+          segment->type, elf_obj, "segments[%i].type", i);                     \
+      set_integer(                                                             \
+          segment->flags, elf_obj, "segments[%i].flags", i);                   \
+      set_integer(                                                             \
+          segment->offset, elf_obj, "segments[%i].offset", i);                 \
+      set_integer(                                                             \
+          segment->virt_addr, elf_obj, "segments[%i].virtual_address", i);     \
+      set_integer(                                                             \
+          segment->phys_addr, elf_obj, "segments[%i].physical_address", i);    \
+      set_integer(                                                             \
+          segment->file_size, elf_obj, "segments[%i].file_size", i);           \
+      set_integer(                                                             \
+          segment->mem_size, elf_obj, "segments[%i].memory_size", i);          \
+      set_integer(                                                             \
+          segment->alignment, elf_obj, "segments[%i].alignment", i);           \
+                                                                               \
       segment++;                                                               \
     }                                                                          \
   }                                                                            \
@@ -263,10 +272,10 @@ begin_declarations;
     declare_integer("type");
     declare_integer("flags");
     declare_integer("offset");
-    declare_integer("virt_addr");
-    declare_integer("phys_addr");
+    declare_integer("virtual_address");
+    declare_integer("physical_address");
     declare_integer("file_size");
-    declare_integer("mem_size");
+    declare_integer("memory_size");
     declare_integer("alignment");
   end_struct_array("segments");
 

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