DO NOT MERGE Add bound checks to utf16_to_utf8 am: 0d9d569c26
am: edce8ad060

Change-Id: I1c725b97d3f1fcabaa7129200ca67c3d479fd771