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

Commit dce98241 authored by Steven Moreland's avatar Steven Moreland
Browse files

libbinder: warn on null binder read

This error does happen a few times during boot, but it can be
pretty hard to discover (evidenced from a few email threads).

Bug: N/A
Test: boot
Change-Id: I650319cb8bdfb9eb65c079077fbf834cbc66b7f9
parent 2362edf7
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -1862,6 +1862,7 @@ status_t Parcel::readStrongBinder(sp<IBinder>* val) const
{
{
    status_t status = readNullableStrongBinder(val);
    status_t status = readNullableStrongBinder(val);
    if (status == OK && !val->get()) {
    if (status == OK && !val->get()) {
        ALOGW("Expecting binder but got null!");
        status = UNEXPECTED_NULL;
        status = UNEXPECTED_NULL;
    }
    }
    return status;
    return status;