[Forensics-changes] [yara] 18/192: Fix regression introduced in previous commit
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 9fae5cc284e94f7beee8d2d027252fb9e53669eb
Author: plusvic <plusvic at gmail.com>
Date: Fri Sep 2 20:07:17 2016 +0200
Fix regression introduced in previous commit
---
libyara/modules/cuckoo.c | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/libyara/modules/cuckoo.c b/libyara/modules/cuckoo.c
index f11fbb7..97ea376 100644
--- a/libyara/modules/cuckoo.c
+++ b/libyara/modules/cuckoo.c
@@ -88,12 +88,13 @@ define_function(network_dns_lookup)
json_array_foreach(dns_info_json, index, value)
{
- json_unpack(value, "{s:s, s:s}", "ip", &ip, field_name, &hostname);
-
- if (yr_re_match(regexp_argument(1), hostname) > 0)
+ if (json_unpack(value, "{s:s, s:s}", "ip", &ip, field_name, &hostname) == 0)
{
- result = 1;
- break;
+ if (yr_re_match(regexp_argument(1), hostname) > 0)
+ {
+ result = 1;
+ break;
+ }
}
}
@@ -122,14 +123,15 @@ uint64_t http_request(
json_array_foreach(http_json, index, value)
{
- json_unpack(value, "{s:s, s:s}", "uri", &uri, "method", &method);
-
- if (((methods & METHOD_GET && strcasecmp(method, "get") == 0) ||
- (methods & METHOD_POST && strcasecmp(method, "post") == 0)) &&
- yr_re_match(uri_regexp, uri) > 0)
+ if (json_unpack(value, "{s:s, s:s}", "uri", &uri, "method", &method) == 0)
{
- result = 1;
- break;
+ if (((methods & METHOD_GET && strcasecmp(method, "get") == 0) ||
+ (methods & METHOD_POST && strcasecmp(method, "post") == 0)) &&
+ yr_re_match(uri_regexp, uri) > 0)
+ {
+ result = 1;
+ break;
+ }
}
}
--
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