diff options
author | Timo Teräs <timo.teras@iki.fi> | 2021-06-07 11:00:18 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2021-06-11 13:35:32 +0300 |
commit | cd9aef8f7cabdb09a7b6e6c4884b8e3db41b0962 (patch) | |
tree | 5046223a561020573986a7dfdd2450be9b3b5921 /src/adb_walk_genadb.c | |
parent | 429e5984c56ab2b7713883298fd9cb1b3905c56e (diff) | |
download | apk-tools-cd9aef8f7cabdb09a7b6e6c4884b8e3db41b0962.tar.gz apk-tools-cd9aef8f7cabdb09a7b6e6c4884b8e3db41b0962.tar.bz2 apk-tools-cd9aef8f7cabdb09a7b6e6c4884b8e3db41b0962.tar.xz apk-tools-cd9aef8f7cabdb09a7b6e6c4884b8e3db41b0962.zip |
genadb: fix maximum inner adb limit checking
Diffstat (limited to 'src/adb_walk_genadb.c')
-rw-r--r-- | src/adb_walk_genadb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/adb_walk_genadb.c b/src/adb_walk_genadb.c index a15aa82..06a3f94 100644 --- a/src/adb_walk_genadb.c +++ b/src/adb_walk_genadb.c @@ -43,6 +43,7 @@ static int adb_walk_genadb_start_object(struct adb_walk *d) if (*adb_ro_kind(&dt->objs[dt->nest-1], dt->curkey[dt->nest-1]) == ADB_KIND_ADB) { struct adb_adb_schema *schema = container_of(&dt->objs[dt->nest-1].schema->kind, struct adb_adb_schema, kind); + if (dt->nestdb >= ARRAY_SIZE(dt->idb)) return -E2BIG; adb_reset(&dt->idb[dt->nestdb]); dt->idb[dt->nestdb].hdr.schema = htole32(schema->schema_id); dt->objs[dt->nest].db = &dt->idb[dt->nestdb]; |