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

Commit a9879efa authored by Chong Zhang's avatar Chong Zhang Committed by android-build-merger
Browse files

Merge "Add minimum size check for ImageGrid atom" into oc-mr1-dev

am: 215185d3

Change-Id: Ib67681af2ecda9aeb8f54609779316eac0abfd99
parents f4a28339 215185d3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1397,7 +1397,8 @@ status_t ItemTable::buildImageItemsIfPossible(uint32_t type) {
        ALOGV("adding %s: itemId %d", image.isGrid() ? "grid" : "image", info.itemId);

        if (image.isGrid()) {
            if (size > 12) {
            // ImageGrid struct is at least 8-byte, at most 12-byte (if flags&1)
            if (size < 8 || size > 12) {
                return ERROR_MALFORMED;
            }
            uint8_t buf[12];