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

Change-Id: I7cf50f96b90c573d437becb478adce718a1d193b
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;