Loading media/libstagefright/id3/ID3.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,8 @@ namespace android { static const size_t kMaxMetadataSize = 3 * 1024 * 1024; ID3::ID3(const sp<DataSource> &source) : mIsValid(false), mData(NULL), Loading Loading @@ -111,6 +113,11 @@ bool ID3::parseV2(const sp<DataSource> &source) { size = (size << 7) | header.enc_size[i]; } if (size > kMaxMetadataSize) { LOGE("skipping huge ID3 metadata of size %d", size); return false; } mData = (uint8_t *)malloc(size); if (mData == NULL) { Loading Loading
media/libstagefright/id3/ID3.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,8 @@ namespace android { static const size_t kMaxMetadataSize = 3 * 1024 * 1024; ID3::ID3(const sp<DataSource> &source) : mIsValid(false), mData(NULL), Loading Loading @@ -111,6 +113,11 @@ bool ID3::parseV2(const sp<DataSource> &source) { size = (size << 7) | header.enc_size[i]; } if (size > kMaxMetadataSize) { LOGE("skipping huge ID3 metadata of size %d", size); return false; } mData = (uint8_t *)malloc(size); if (mData == NULL) { Loading