Add bound checks to utf16_to_utf8 am: 1deedbacc3
am: ea79ab4e82

Change-Id: Ic7880fbadc52f5d36deca38812fa092608d43c2a