[Forensics-changes] [yara] 318/407: Fix warning due to uninitialised variable with certain compilers

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:28:40 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 ba91e84a0d197fd12c321c3367182b8af97a0c13
Author: Victor M. Alvarez <plusvic at gmail.com>
Date:   Mon Jan 5 13:57:22 2015 +0100

    Fix warning due to uninitialised variable with certain compilers
---
 libyara/modules/math.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libyara/modules/math.c b/libyara/modules/math.c
index 820c5e5..d599887 100644
--- a/libyara/modules/math.c
+++ b/libyara/modules/math.c
@@ -289,7 +289,7 @@ define_function(data_serial_correlation)
     return ERROR_WRONG_ARGUMENTS;
   }
 
-  double scc, sccun;
+  double sccun = 0;
   double scclast = 0;
   double scct1 = 0;
   double scct2 = 0;
@@ -337,7 +337,8 @@ define_function(data_serial_correlation)
 
   scct1 += scclast * sccun;
   scct2 *= scct2;
-  scc = total_len * scct3 - scct2;
+
+  double scc = total_len * scct3 - scct2;
 
   if (scc == 0)
     scc = -100000;

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