[Forensics-changes] [yara] 144/407: Conditionalize the counter decrementing.

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:28:19 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 1e04878a3206c9321dfb7ca9d846ba0ea686c778
Author: Wesley Shields <wxs at atarininja.org>
Date:   Wed Oct 22 23:39:18 2014 -0400

    Conditionalize the counter decrementing.
---
 libyara/modules/pe.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libyara/modules/pe.c b/libyara/modules/pe.c
index e0a00ad..f491b79 100644
--- a/libyara/modules/pe.c
+++ b/libyara/modules/pe.c
@@ -2498,7 +2498,8 @@ void pe_parse_certificates(
   }
 
   // Decrement counter as it gets incremented one extra time erroneously.
-  counter--;
+  if (counter > 0)
+    counter--;
   set_integer(counter, pe->object, "signature_length");
   return;
 }

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