[Forensics-changes] [yara] 104/407: Fix build on OS X.
Hilko Bengen
bengen at moszumanska.debian.org
Sat Jul 1 10:28:15 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 6e1b85153760ab881e8389aef72efc7d56247632
Author: Wesley Shields <wxs at atarininja.org>
Date: Mon Oct 13 15:07:43 2014 -0400
Fix build on OS X.
pe_parse_imports() return type is void. The build on OS X uses -Wreturn-type,
which causes this error:
modules/pe.c:2293:5: error: void function 'pe_parse_imports' should not return a value [-Wreturn-type]
---
libyara/modules/pe.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libyara/modules/pe.c b/libyara/modules/pe.c
index 2ec89c9..320d1ab 100644
--- a/libyara/modules/pe.c
+++ b/libyara/modules/pe.c
@@ -2285,12 +2285,12 @@ void pe_parse_imports(PE* pe)
pe, IMAGE_DIRECTORY_ENTRY_IMPORT);
if (directory->VirtualAddress == 0)
- return NULL;
+ return;
uint64_t offset = pe_rva_to_offset(pe, directory->VirtualAddress);
if (offset == 0 || !struct_fits_in_pe(pe, offset, IMAGE_IMPORT_DESCRIPTOR))
- return NULL;
+ return;
PIMAGE_IMPORT_DESCRIPTOR imports = (PIMAGE_IMPORT_DESCRIPTOR) \
(pe->data + offset);
--
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