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

Change-Id: I73e84de9a7f3d9ce5a1bbfbf99bd21c610662c4c
diff --git a/media/libstagefright/id3/ID3.cpp b/media/libstagefright/id3/ID3.cpp
index 35691b9..86b668c 100644
--- a/media/libstagefright/id3/ID3.cpp
+++ b/media/libstagefright/id3/ID3.cpp
@@ -531,6 +531,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;