summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Muizelaar <jmuizelaar@mozilla.com>2010-02-18 16:39:03 -0500
committerJeff Muizelaar <jmuizelaar@mozilla.com>2010-02-18 16:39:03 -0500
commitaa139477ebeed60b2ae3444254a180d50842a1c0 (patch)
tree5173eee3a73b9e7a7c98e509dd6c8cc9f661686a
parent99afd86d57d431dc3317c1123d8078cbf5afdb97 (diff)
Accept ICCv4 profiles
ICCv4 profiles are a superset of ICCv2 so it shouldn't hurt us to accept them and just treat them the same way we do ICCv2 profiles.
-rw-r--r--iccread.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/iccread.c b/iccread.c
index e1aa0fe..65b4418 100644
--- a/iccread.c
+++ b/iccread.c
@@ -148,10 +148,12 @@ static void check_profile_version(struct mem_source *src)
uint8_t minor_revision = read_u8(src, 8 + 1);
uint8_t reserved1 = read_u8(src, 8 + 2);
uint8_t reserved2 = read_u8(src, 8 + 3);
- if (major_revision > 0x2)
- invalid_source(src, "Unsupported major revision");
- if (minor_revision > 0x40)
- invalid_source(src, "Unsupported minor revision");
+ if (major_revision != 0x4) {
+ if (major_revision > 0x2)
+ invalid_source(src, "Unsupported major revision");
+ if (minor_revision > 0x40)
+ invalid_source(src, "Unsupported minor revision");
+ }
if (reserved1 != 0 || reserved2 != 0)
invalid_source(src, "Invalid reserved bytes");
}