Check that the profile is an RGB profile before checking if it's bogus
This avoids unitialized reads on non-RGB profiles.
diff --git a/iccread.c b/iccread.c
index e9a6eac..f3886e0 100644
--- a/iccread.c
+++ b/iccread.c
@@ -227,6 +227,10 @@
bool negative;
unsigned i;
+ // We currently only check the bogosity of RGB profiles
+ if (profile->color_space != RGB_SIGNATURE)
+ return false;
+
rX = s15Fixed16Number_to_float(profile->redColorant.X);
rY = s15Fixed16Number_to_float(profile->redColorant.Y);
rZ = s15Fixed16Number_to_float(profile->redColorant.Z);