Merge "Prevent crash for malformed ID3 COMM frame" am: 944706f468
am: 5c487ff344

Change-Id: I512b4df1b87f9be715896f418fd7618d3d234e82
diff --git a/media/libstagefright/id3/ID3.cpp b/media/libstagefright/id3/ID3.cpp
index 3942158..aaf6b3d 100644
--- a/media/libstagefright/id3/ID3.cpp
+++ b/media/libstagefright/id3/ID3.cpp
@@ -534,6 +534,9 @@
     }
     size_t n = mFrameSize - getHeaderLength() - 1;
     if (otherdata) {
+        if (n < 5) {
+            return;
+        }
         // skip past the encoding, language, and the 0 separator
         frameData += 4;
         int32_t i = n - 4;