diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-11-28 22:41:37 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-11-28 22:41:37 (GMT) |
commit | 48395d4471d87c20bdbd06bbab1ae3af938ff823 (patch) | |
tree | 00aaaabb7370d6163ed9a2a4f77f9a177f8126f7 /src/analysis/contents/restricted.c | |
parent | 472d566943f527e18eb95f31dbe70c50043396aa (diff) |
Improved the API for binary contents a little bit.
Diffstat (limited to 'src/analysis/contents/restricted.c')
-rw-r--r-- | src/analysis/contents/restricted.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/analysis/contents/restricted.c b/src/analysis/contents/restricted.c index 8e5242e..5c781e7 100644 --- a/src/analysis/contents/restricted.c +++ b/src/analysis/contents/restricted.c @@ -156,6 +156,12 @@ static void g_restricted_content_class_init(GRestrictedContentClass *klass) static void g_restricted_content_init(GRestrictedContent *content) { + vmpa2t dummy; /* Localisation nulle */ + + content->internal = NULL; + + init_vmpa(&dummy, VMPA_NO_PHYSICAL, VMPA_NO_VIRTUAL); + init_mrange(&content->range, &dummy, 0); } @@ -833,3 +839,23 @@ static bool g_restricted_content_read_leb128(const GRestrictedContent *content, return result; } + + +/****************************************************************************** +* * +* Paramètres : content = contenu binaire à venir lire. * +* range = espace de restrictions pour les accès. [OUT] * +* * +* Description : Indique l'espace de restriction appliqué à un contenu. * +* * +* Retour : - * +* * +* Remarques : - * +* * +******************************************************************************/ + +void g_restricted_content_get_range(const GRestrictedContent *content, mrange_t *range) +{ + copy_mrange(range, &content->range); + +} |