diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2023-09-12 04:43:02 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2023-09-12 04:45:25 (GMT) |
commit | fed4c10b9bb1c6f99440dba3839a1e7b56b40359 (patch) | |
tree | d544bde345c16a5eff19c0f9a074c09b366f7dbe /src/analysis/scan/rule.c | |
parent | 155c500b8933d2c7269215ea1d141d341de0a44f (diff) |
Save current state with some ROST extra features.
Diffstat (limited to 'src/analysis/scan/rule.c')
-rw-r--r-- | src/analysis/scan/rule.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/analysis/scan/rule.c b/src/analysis/scan/rule.c index 4727c9d..1d68b80 100644 --- a/src/analysis/scan/rule.c +++ b/src/analysis/scan/rule.c @@ -369,6 +369,8 @@ bool g_scan_rule_setup_backend(GScanRule *rule, GEngineBackend *backend, GScanCo void g_scan_rule_check(GScanRule *rule, GEngineBackend *backend, GScanContext *context) { GBinContent *content; /* Contenu à manipuler */ + vmpa2t start; /* Point de début du contenu */ + vmpa2t end; /* Point de fin du contenu */ pending_matches_t matches; /* Suivi de correspondances */ size_t i; /* Boucle de parcours #1 */ GSearchPattern *pattern; /* Motif à intégrer */ @@ -378,11 +380,14 @@ void g_scan_rule_check(GScanRule *rule, GEngineBackend *backend, GScanContext *c content = g_scan_context_get_content(context); + g_binary_content_compute_start_pos(content, &start); + g_binary_content_compute_end_pos(content, &end); + /* Consolidation des résultats */ for (i = 0; i < rule->bytes_used; i++) { - init_pending_matches(&matches); + init_pending_matches(&matches, &start.physical, &end.physical); pattern = rule->bytes_locals[i]; |