[Forensics-changes] [yara] 137/368: Fixes issue #388 (nested dictionaries causing segfault)

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:30:20 UTC 2017


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

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

commit e13aaf7baf8975fb12c41db64810a609203dbd53
Author: AB <AB at null.com>
Date:   Fri Jan 8 00:39:52 2016 -0800

    Fixes issue #388 (nested dictionaries causing segfault)
---
 libyara/object.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/libyara/object.c b/libyara/object.c
index f96abcd..3fe38ea 100644
--- a/libyara/object.c
+++ b/libyara/object.c
@@ -628,6 +628,21 @@ int yr_object_copy(
       }
 
       break;
+
+    case OBJECT_TYPE_DICTIONARY:
+      ;
+      YR_OBJECT_DICTIONARY *dict = (YR_OBJECT_DICTIONARY *) object;
+      YR_OBJECT *prototype_item;
+
+      yr_object_copy(dict->prototype_item, &prototype_item);
+
+      ((YR_OBJECT_DICTIONARY *)copy)->prototype_item = prototype_item;
+
+      break;
+
+    default:
+      assert(FALSE);
+
   }
 
   *object_copy = copy;

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