DO NOT MERGE: defensive parsing of mp3 album art information
several points in stagefrights mp3 album art code
used strlen() to parse user-supplied strings that may be
unterminated, resulting in reading beyond the end of a buffer.
This changes the code to use strnlen() for 8-bit encodings and
strengthens the parsing of 16-bit encodings similarly. It also
reworks how we watch for the end-of-buffer to avoid all over-reads.
Test: crafted mp3's w/ good/bad cover art. See what showed in play music
(cherry picked from commit fa0806b594e98f1aed3ebcfc6a801b4c0056f9eb)
1 file changed