Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

frameworks-av: Commit

frameworks/av


Commit MetaInfo

Révision7306d8b37c00729dc41d663a4b244a00209d537b (tree)
l'heure2018-05-26 03:39:00
AuteurChong Zhang <chz@goog...>
Commiterandroid-build-team Robot

Message de Log

Add minimum size check for ImageGrid atom

bug: 73927042
Change-Id: I25dc3aeabe95bd907a418b12b2d06f3691cb1b42
(cherry picked from commit ef75163eb891b5259c0f5c2fc20fca2a5a47b7b7)

Change Summary

Modification

--- a/media/libstagefright/ItemTable.cpp
+++ b/media/libstagefright/ItemTable.cpp
@@ -1335,7 +1335,8 @@ status_t ItemTable::buildImageItemsIfPossible(uint32_t type) {
13351335 ALOGV("adding %s: itemId %d", image.isGrid() ? "grid" : "image", info.itemId);
13361336
13371337 if (image.isGrid()) {
1338- if (size > 12) {
1338+ // ImageGrid struct is at least 8-byte, at most 12-byte (if flags&1)
1339+ if (size < 8 || size > 12) {
13391340 return ERROR_MALFORMED;
13401341 }
13411342 uint8_t buf[12];
Afficher sur ancien navigateur de dépôt.