[Forensics-changes] [yara] 154/192: Fix issue with ERROR_TOO_MANY_RE_FIBERS being returned spuriously

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:31:59 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 f12262c21f0c98fec0647de0c3e76c0c55961d78
Author: plusvic <plusvic at gmail.com>
Date:   Thu Apr 27 09:34:34 2017 +0200

    Fix issue with ERROR_TOO_MANY_RE_FIBERS being returned spuriously
---
 libyara/re.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libyara/re.c b/libyara/re.c
index a5e4b86..dcb063c 100644
--- a/libyara/re.c
+++ b/libyara/re.c
@@ -1324,9 +1324,6 @@ int _yr_re_fiber_create(
 {
   RE_FIBER* fiber;
 
-  if (fiber_pool->fiber_count == RE_MAX_FIBERS)
-    return ERROR_TOO_MANY_RE_FIBERS;
-
   if (fiber_pool->fibers.head != NULL)
   {
     fiber = fiber_pool->fibers.head;
@@ -1337,6 +1334,9 @@ int _yr_re_fiber_create(
   }
   else
   {
+    if (fiber_pool->fiber_count == RE_MAX_FIBERS)
+      return ERROR_TOO_MANY_RE_FIBERS;
+
     fiber = (RE_FIBER*) yr_malloc(sizeof(RE_FIBER));
 
     if (fiber == NULL)

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