From 2f1186aa404ea86eb53ad89ec2df315e607f90aa Mon Sep 17 00:00:00 2001 From: Timo Teräs Date: Wed, 21 Jul 2021 16:13:39 +0300 Subject: adb: make adb mmap/stream parser more united, add ADB_BLOCK_DATAX Harden the error checking of expected block types and their order. Add ADB_BLOCK_DATAX as reserved for >1GB blocks. --- src/adb.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/adb.h') diff --git a/src/adb.h b/src/adb.h index 146ad07..051245c 100644 --- a/src/adb.h +++ b/src/adb.h @@ -54,8 +54,9 @@ struct adb_header { /* Blocks */ #define ADB_BLOCK_ALIGNMENT 8 #define ADB_BLOCK_ADB 0 -#define ADB_BLOCK_SIG 2 -#define ADB_BLOCK_DATA 3 +#define ADB_BLOCK_SIG 1 +#define ADB_BLOCK_DATA 2 +#define ADB_BLOCK_DATAX 3 struct adb_block { uint32_t type_size; -- cgit v1.2.3-70-g09d2