diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2024-01-21 22:36:47 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2024-01-21 22:36:47 (GMT) |
commit | 0ff1e52622828663d01f98c97f2cd8eccb8facf8 (patch) | |
tree | 88b5fcf2412f863276876d0b8ad8db91903f3758 /src/analysis/scan/context-int.h | |
parent | 0fac40d5a5752e8d7b92f57ea3cfa089f13a2d1f (diff) |
Refactor the scan match storage.
Diffstat (limited to 'src/analysis/scan/context-int.h')
-rw-r--r-- | src/analysis/scan/context-int.h | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/src/analysis/scan/context-int.h b/src/analysis/scan/context-int.h index 613ca73..efbd24e 100644 --- a/src/analysis/scan/context-int.h +++ b/src/analysis/scan/context-int.h @@ -33,28 +33,6 @@ -#define ALLOCATION_STEP 10 - -/* Mémorisation des correspondances partielles */ -typedef struct _atom_match_tracker_t -{ - phys_t *matches; /* Correspondances à confirmer */ - size_t allocated; /* Taille du talbeau préparé */ - size_t used; /* Nombre d'éléments présents */ - -} atom_match_tracker_t; - -/* Mémorisation des correspondances complètes, par motif */ -typedef struct _full_match_tracker_t -{ - GSearchPattern *pattern; /* Motif commun aux trouvailles*/ - - GScanMatch **matches; /* Correspondances confirmées */ - size_t allocated; /* Taille du talbeau préparé */ - size_t used; /* Nombre d'éléments présents */ - -} full_match_tracker_t; - /* Condition définissant une règle de correspondance */ typedef struct _rule_condition_t { @@ -76,13 +54,10 @@ struct _GScanContext GBinContent *content; /* Contenu binaire traité */ bool scan_done; /* Phase d'analyse terminée ? */ - patid_t next_patid; /* Prochain indice utilisable */ - - atom_match_tracker_t *atom_trackers; /* Correspondances partielles */ + GUMemSlice **match_storages; /* Suivi de correspondances */ + size_t storages_count; /* Quantité de ces suivis */ - full_match_tracker_t **full_trackers; /* Correspondances confirmées */ - size_t full_count; /* Quantité de correspondances */ - full_match_tracker_t *current_tracker; /* Dernier gestionnaire visé */ + GHashTable *full_trackers; /* Correspondances confirmées */ bool global; /* Validation globale */ |