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

Commit 2c20bbf9 authored by Steven Moreland's avatar Steven Moreland
Browse files

Better error message for bad array write.

Noticed this didn't match the check.

Bug: 143556646
Test: N/A
Change-Id: If6b1a63844a7ffbd325f20ed00852f83d3e3a9c1
parent df9ad97a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ binder_status_t WriteAndValidateArraySize(AParcel* parcel, bool isNullArray, int
    if (length < -1) return STATUS_BAD_VALUE;

    if (!isNullArray && length < 0) {
        LOG(ERROR) << __func__ << ": null array must be used with length == -1.";
        LOG(ERROR) << __func__ << ": non-null array but length is " << length;
        return STATUS_BAD_VALUE;
    }
    if (isNullArray && length > 0) {