[Forensics-changes] [yara] 323/407: Include terminating NULL character in strings written to sz_arena

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:28:41 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 27055159ed1594b8357ad4280e82977f1f5f23fc
Author: Victor Manuel Alvarez <vmalvarez at virustotal.com>
Date:   Wed Jan 7 11:27:44 2015 +0100

    Include terminating NULL character in strings written to sz_arena
    
    If the NULL is not written everything works fine, but it causes confusion during debugging cause all other strings in the arena are NULL-terminated.
---
 libyara/parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libyara/parser.c b/libyara/parser.c
index 6f3b26a..7906918 100644
--- a/libyara/parser.c
+++ b/libyara/parser.c
@@ -349,7 +349,7 @@ int _yr_parser_write_string(
     result = yr_arena_write_data(
         compiler->sz_arena,
         literal_string->c_string,
-        literal_string->length,
+        literal_string->length + 1,
         (void**) &(*string)->string);
 
     if (result == ERROR_SUCCESS)

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