summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2010-03-15 22:45:02 -0700
committerKenny Root <kroot@google.com>2010-03-15 22:47:18 -0700
commit0c2ab24b9406b803a6993513de208113092bb597 (patch)
treee31d11bcee4d1b2f96d11b469923e8dd5358e0d7 /media
parent650e22ca3a97501e12f4befb80f2cd5b39ea78bc (diff)
downloadframeworks_base-0c2ab24b9406b803a6993513de208113092bb597.zip
frameworks_base-0c2ab24b9406b803a6993513de208113092bb597.tar.gz
frameworks_base-0c2ab24b9406b803a6993513de208113092bb597.tar.bz2
Adjust expected text frame length in ID3
When encountering a null character in an ID3 text frame, adjust the expected size accordingly so it isn't misidentified as ASCII. This fixes http://b/2517444 Change-Id: I19a3284d378e882c33b28ecee528a434716c7707
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/id3/ID3.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/media/libstagefright/id3/ID3.cpp b/media/libstagefright/id3/ID3.cpp
index 16a2a10..b263238 100644
--- a/media/libstagefright/id3/ID3.cpp
+++ b/media/libstagefright/id3/ID3.cpp
@@ -275,6 +275,7 @@ static void convertISO8859ToString8(
size_t utf8len = 0;
for (size_t i = 0; i < size; ++i) {
if (data[i] == '\0') {
+ size = i;
break;
} else if (data[i] < 0x80) {
++utf8len;