Add bound checks to utf16_to_utf8

Bug: 29250543
Change-Id: I518e7b2fe10aaa3f1c1987586a09b1110aff7e1a
(cherry picked from commit 7e93b2ddcb49b5365fbe1dab134ffb38e6f1c719)

status_t Parcel::readParcelable(Parcelable* parcelable) const {
 int32_t have_parcelable = 0;
 status_t status = readInt32(&have_parcelable);
 if (status != OK) {
 return status;
 }
 if (!have_parcelable) {
 return UNEXPECTED_NULL;
 }
 return parcelable->readFromParcel(this);
}

status_t Parcel::readParcelable(Parcelable* parcelable) const {
 int32_t have_parcelable = 0;
 status_t status = readInt32(&have_parcelable);
 if (status != OK) {
 return status;
 }
 if (!have_parcelable) {
 return UNEXPECTED_NULL;
 }
 return parcelable->readFromParcel(this);
}
