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

Commit 3ff42263 authored by Wan He's avatar Wan He
Browse files

Fix incorrect calculation of sizeof package structure



Argument "package" is a pointer, not the structure.

Signed-off-by: default avatarWan He <xiaolin.gxl@alibaba-inc.com>
parent 3ebcf121
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3166,7 +3166,7 @@ struct ResTable::Package
{
    Package(ResTable* _owner, const Header* _header, const ResTable_package* _package)
        : owner(_owner), header(_header), package(_package), typeIdOffset(0) {
        if (dtohs(package->header.headerSize) == sizeof(package)) {
        if (dtohs(package->header.headerSize) == sizeof(*package)) {
            // The package structure is the same size as the definition.
            // This means it contains the typeIdOffset field.
            typeIdOffset = package->typeIdOffset;