From 2c20bbf9c81bf44b56af359e29c483f205c81715 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Wed, 30 Oct 2019 15:18:58 -0700 Subject: Better error message for bad array write. Noticed this didn't match the check. Bug: 143556646 Test: N/A Change-Id: If6b1a63844a7ffbd325f20ed00852f83d3e3a9c1 --- libs/binder/ndk/parcel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/binder/ndk/parcel.cpp b/libs/binder/ndk/parcel.cpp index ae2276e794..f18e118bc9 100644 --- a/libs/binder/ndk/parcel.cpp +++ b/libs/binder/ndk/parcel.cpp @@ -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) { -- cgit v1.2.3-59-g8ed1b