[Forensics-changes] [yara] 21/192: Return error if the number of threads specified with --threads is greater than MAX_THREADS

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:31:42 UTC 2017


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

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

commit e516bedb4ba2ea6810a6d451e106c1de8da0915f
Author: plusvic <plusvic at gmail.com>
Date:   Thu Sep 8 18:41:59 2016 +0200

    Return error if the number of threads specified with --threads is greater than MAX_THREADS
---
 yara.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/yara.c b/yara.c
index a8503b7..7c27bc8 100644
--- a/yara.c
+++ b/yara.c
@@ -1011,6 +1011,12 @@ int main(
     return EXIT_SUCCESS;
   }
 
+  if (threads > MAX_THREADS)
+  {
+    fprintf(stderr, "maximum number of threads is %d\n", MAX_THREADS);
+    return EXIT_FAILURE;
+  }
+
   if (argc != 2)
   {
     // After parsing the command-line options we expect two additional

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