Explorar o código

LibGfx: Validate type of cicpTag in ICC Profile

This should've really been part of e8bbb3d91536.
Nico Weber %!s(int64=2) %!d(string=hai) anos
pai
achega
839bec14af
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      Userland/Libraries/LibGfx/ICC/Profile.cpp

+ 2 - 1
Userland/Libraries/LibGfx/ICC/Profile.cpp

@@ -984,7 +984,8 @@ ErrorOr<void> Profile::check_tag_types()
 
     // ICC v4, 9.2.17 cicpTag
     // "Permitted tag types: cicpType"
-    // FIXME
+    if (!has_type(cicpTag, { CicpTagData::Type }, {}))
+        return Error::from_string_literal("ICC::Profile: cicpTag has unexpected type");
 
     // ICC v4, 9.2.18 colorantOrderTag
     // "Permitted tag types: colorantOrderType"