summaryrefslogtreecommitdiff
path: root/src/adb.h
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2021-07-21 16:13:39 +0300
committerTimo Teräs <timo.teras@iki.fi>2021-07-22 16:14:49 +0300
commit2f1186aa404ea86eb53ad89ec2df315e607f90aa (patch)
tree1de8e1399ce6a070a5f6b3067d11c884c161c506 /src/adb.h
parent05364528bbb5e1300187da3c3df474b9eaee2138 (diff)
downloadapk-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.h5
1 files changed, 3 insertions, 2 deletions
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;