libutils/Unicode.cpp: Correct length computation and add checks for u… · ResurrectionRemix/system_core@3c28cda

…tf16->utf8 Inconsistent behaviour between utf16_to_utf8 and utf16_to_utf8_length is causing a heap overflow. Correcting the length computation and adding bound checks to the conversion functions...