diff options
author | Timo Teräs <timo.teras@iki.fi> | 2021-07-21 16:13:39 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2021-07-22 16:14:49 +0300 |
commit | 2f1186aa404ea86eb53ad89ec2df315e607f90aa (patch) | |
tree | 1de8e1399ce6a070a5f6b3067d11c884c161c506 /src/adb.h | |
parent | 05364528bbb5e1300187da3c3df474b9eaee2138 (diff) | |
download | apk-tools-2f1186aa404ea86eb53ad89ec2df315e607f90aa.tar.gz apk-tools-2f1186aa404ea86eb53ad89ec2df315e607f90aa.tar.bz2 apk-tools-2f1186aa404ea86eb53ad89ec2df315e607f90aa.tar.xz apk-tools-2f1186aa404ea86eb53ad89ec2df315e607f90aa.zip |
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.
Diffstat (limited to 'src/adb.h')
-rw-r--r-- | src/adb.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; |