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

Commit 9809602a authored by Chris Forbes's avatar Chris Forbes
Browse files

ui: Fix bad size check in Fence::unflatten

Differs slightly from mnc+ patch: GetFlattenedSize was fixed in mnc.

Test: Boot device, run poc from bug, observe no longer crashes
Bug: 37285689
Change-Id: Id8b851733b088cce0d07493fbf76e7e24f9299ad
parent 2ae83f4f
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -127,7 +127,7 @@ nsecs_t Fence::getSignalTime() const {
}
}


size_t Fence::getFlattenedSize() const {
size_t Fence::getFlattenedSize() const {
    return 1;
    return 4;
}
}


size_t Fence::getFdCount() const {
size_t Fence::getFdCount() const {
@@ -152,7 +152,7 @@ status_t Fence::unflatten(void const*& buffer, size_t& size, int const*& fds, si
        return INVALID_OPERATION;
        return INVALID_OPERATION;
    }
    }


    if (size < 1) {
    if (size < getFlattenedSize()) {
        return NO_MEMORY;
        return NO_MEMORY;
    }
    }