Merge tag 'android-security-10.0.0_r53' into int/10/fp2

Android security 10.0.0 release 53

* tag 'android-security-10.0.0_r53':

Change-Id: I60fa2955f3a3554f5e532d50f68d18153f4ecc2f
diff --git a/internal/dynamic_depth/depth_jpeg.cc b/internal/dynamic_depth/depth_jpeg.cc
index 396a41e..af2ead9 100644
--- a/internal/dynamic_depth/depth_jpeg.cc
+++ b/internal/dynamic_depth/depth_jpeg.cc
@@ -19,6 +19,7 @@
 
 int32_t ValidateAndroidDynamicDepthBuffer(const char* buffer, size_t buffer_length) {
   XmpData xmp_data;
+  std::string itemMime("image/jpeg");
   const string image_data(buffer, buffer_length);
   ReadXmpFromMemory(image_data, /*XmpSkipExtended*/ false, &xmp_data);
 
@@ -29,6 +30,18 @@
     return -1;
   }
 
+  // Check the container items mime type
+  if ((device->GetContainer() == nullptr) || (device->GetContainer()->GetItems().empty())) {
+    LOG(ERROR) << "No container or container items found!";
+    return -1;
+  }
+  auto items = device->GetContainer()->GetItems();
+  for (const auto& item : items) {
+    if (item->GetMime() != itemMime) {
+      LOG(ERROR) << "Item MIME type doesn't match the expected value: " << itemMime;
+      return -1;
+    }
+  }
   // Check profiles
   const Profiles* profiles = device->GetProfiles();
   if (profiles == nullptr) {