From 80fc0e13dbad5dac7b71553f90cee2dbc560a3ca Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 23 Jul 2024 13:12:54 -0700 Subject: [PATCH] disallow arbitrary data gap between header and first block --- src/file.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/file.rs b/src/file.rs index 3381dff..786cef8 100644 --- a/src/file.rs +++ b/src/file.rs @@ -25,7 +25,9 @@ u128 resource_uuid //global block layout (variable size) u64 num_blocks -for block_id in 0..num_blocks{ +//the start of the first block is implicitly after the global header (32) +//num_blocks+1 used in Header.block_location is implicitly the end of the file +for block_id in 1..num_blocks{ u64 first_byte }