]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - aft.c
aft: Avoid invalid read.
[paraslash.git] / aft.c
diff --git a/aft.c b/aft.c
index f41bfadea25385c4ab1c9a169a15b0c755440c98..e370eaad80cdfadc9dbd62b357442e200945934e 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -407,7 +407,7 @@ static void load_chunk_table(struct afh_info *afhi, const struct osl_object *ct)
        int i;
        size_t sz;
 
-       if (!ct->data || ct->size < 4) {
+       if (!ct->data || ct->size < 4 * (afhi->chunks_total + 1)) {
                afhi->chunk_table = NULL;
                return;
        }