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

Commit 933ff344 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

am: a9879efa

Change-Id: Ia3a3c05745f46cb96f9770dcbcccc97f2e9ddf45
parents d0079dbd a9879efa
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line 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);
        ALOGV("adding %s: itemId %d", image.isGrid() ? "grid" : "image", info.itemId);


        if (image.isGrid()) {
        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;
                return ERROR_MALFORMED;
            }
            }
            uint8_t buf[12];
            uint8_t buf[12];