From 839bec14af2d50e653142556d3e0652a397cbc09 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Wed, 8 Feb 2023 12:16:35 -0500 Subject: [PATCH] LibGfx: Validate type of cicpTag in ICC Profile This should've really been part of e8bbb3d91536. --- Userland/Libraries/LibGfx/ICC/Profile.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibGfx/ICC/Profile.cpp b/Userland/Libraries/LibGfx/ICC/Profile.cpp index 56e05baa1b..9a37d49357 100644 --- a/Userland/Libraries/LibGfx/ICC/Profile.cpp +++ b/Userland/Libraries/LibGfx/ICC/Profile.cpp @@ -984,7 +984,8 @@ ErrorOr 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"