summaryrefslogtreecommitdiff
path: root/src/analysis/scan
diff options
context:
space:
mode:
Diffstat (limited to 'src/analysis/scan')
-rw-r--r--src/analysis/scan/rule.c6
-rw-r--r--src/analysis/scan/scanner.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/analysis/scan/rule.c b/src/analysis/scan/rule.c
index 5826db9..d4420b7 100644
--- a/src/analysis/scan/rule.c
+++ b/src/analysis/scan/rule.c
@@ -665,6 +665,12 @@ void g_scan_rule_output_to_text(const GScanRule *rule, GScanContext *context, bo
GBinContent *content; /* Contenu binaire scanné */
char *desc; /* Description de ce contenu */
+ /**
+ * Si la règle n'a pas fait mouche, rien n'est imprimé.
+ */
+ if (!g_scan_context_has_match_for_rule(context, rule->name))
+ return;
+
options = g_scan_context_get_options(context);
selected = g_scan_options_has_tag_as_selected(options, NULL);
diff --git a/src/analysis/scan/scanner.c b/src/analysis/scan/scanner.c
index 7b553e6..57fe0d9 100644
--- a/src/analysis/scan/scanner.c
+++ b/src/analysis/scan/scanner.c
@@ -530,7 +530,7 @@ GScanContext *g_content_scanner_analyze(GContentScanner *scanner, GScanOptions *
global = true;
- for (i = 0; i < scanner->rule_count; i++)
+ for (i = 0; i < scanner->rule_count && global; i++)
{
rule = scanner->rules[i];