summaryrefslogtreecommitdiff
path: root/src/analysis/content-int.h
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-09-24 21:18:51 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-09-24 21:18:51 (GMT)
commit3c970a0a1b74a1991be303132221329f3eef0b91 (patch)
tree7f3c9e8969f5c5c9fe1188c762dda0668c6f9ff6 /src/analysis/content-int.h
parent65a4b8d9c1929fb7b171d630d336519fc4d418ef (diff)
Prevented out of bounds access when moving the reading position forwards.
Diffstat (limited to 'src/analysis/content-int.h')
-rw-r--r--src/analysis/content-int.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/analysis/content-int.h b/src/analysis/content-int.h
index 24cea81..558e32c 100644
--- a/src/analysis/content-int.h
+++ b/src/analysis/content-int.h
@@ -41,6 +41,9 @@ typedef void (* compute_checksum_fc) (GBinContent *, GChecksum *);
/* Détermine le nombre d'octets lisibles. */
typedef phys_t (* compute_size_fc) (const GBinContent *);
+/* Avance la tête de lecture d'une certaine quantité de données. */
+typedef bool (* seek_fc) (const GBinContent *, vmpa2t *, phys_t);
+
/* Donne accès à une portion des données représentées. */
typedef const bin_t * (* get_raw_access_fc) (const GBinContent *, vmpa2t *, phys_t);
@@ -82,6 +85,8 @@ struct _GBinContentIface
compute_size_fc compute_size; /* Calcul de la taille totale */
+ seek_fc seek; /* Avancée de tête de lecture */
+
get_raw_access_fc get_raw_access; /* Accès brut à une position */
read_raw_fc read_raw; /* Lecture brute */