Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 70e4dec5 authored by Ryan Mitchell's avatar Ryan Mitchell Committed by Android (Google) Code Review
Browse files

Merge changes from topic "dynamic-ref-se-mnc-dev" into mnc-dr-dev

* changes:
  [automerger] Fix DynamicRefTable::load security bug am: 8cf0f988
  Fix DynamicRefTable::load security bug
parents ac3afe60 d65dbf91
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -6220,8 +6220,16 @@ status_t ResTable::parsePackage(const ResTable_package* const pkg,
            }

        } else if (ctype == RES_TABLE_LIBRARY_TYPE) {

            if (group->dynamicRefTable.entries().size() == 0) {
                status_t err = group->dynamicRefTable.load((const ResTable_lib_header*) chunk);
                const ResTable_lib_header* lib = (const ResTable_lib_header*) chunk;
                status_t err = validate_chunk(&lib->header, sizeof(*lib),
                                              endPos, "ResTable_lib_header");
                if (err != NO_ERROR) {
                    return (mError=err);
                }

                err = group->dynamicRefTable.load(lib);
                if (err != NO_ERROR) {
                    return (mError=err);
                }