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

Commit 7cdf5c26 authored by Andrei Homescu's avatar Andrei Homescu
Browse files

libbinder: fix one implicit cast that triggers sanitizer

One bitwise-complement of a constant value in BpBinder
triggers UBSan on Trusty. This fixes that by adding
an explicit static cast.

Bug: 224644083
Test: m
Change-Id: Idc771d8e922fbeaf8d3342dfb9b63a423df6a737
parent 491e8451
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -279,7 +279,7 @@ status_t BpBinder::transact(
    if (mAlive) {
        bool privateVendor = flags & FLAG_PRIVATE_VENDOR;
        // don't send userspace flags to the kernel
        flags = flags & ~FLAG_PRIVATE_VENDOR;
        flags = flags & ~static_cast<uint32_t>(FLAG_PRIVATE_VENDOR);

        // user transactions require a given stability level
        if (code >= FIRST_CALL_TRANSACTION && code <= LAST_CALL_TRANSACTION) {