[automerger] Fix possible out of bounds read am: 3762e06152 am: ecc92a1a86 am: 1c7bb87a42 am: 4cdd5c3af5 am: bad0533d2e am: 19d1113bb0 am: 8aeab2cad9
Change-Id: I783c7188d71b1f0bd36320a94fcbd9a9e7e39228
diff --git a/media/libstagefright/id3/ID3.cpp b/media/libstagefright/id3/ID3.cpp
index 4e1cdf6..ca2be54 100644
--- a/media/libstagefright/id3/ID3.cpp
+++ b/media/libstagefright/id3/ID3.cpp
@@ -603,6 +603,9 @@
// UCS-2
// API wants number of characters, not number of bytes...
int len = n / 2;
+ if (len == 0) {
+ return;
+ }
const char16_t *framedata = (const char16_t *) (frameData + 1);
char16_t *framedatacopy = NULL;
if (*framedata == 0xfffe) {