blob: c2b5068645e4fd31b6dc328b4e1f3985aa654999 [file] [log] [blame]
Nicolas Penaf7520392017-08-10 16:36:56 -04001diff --git a/third_party/lcms/src/cmsplugin.c b/third_party/lcms/src/cmsplugin.c
Nicolas Pena0bd84722017-08-14 10:36:01 -04002index 79b145d2d..29ddd9a49 100644
Nicolas Penaf7520392017-08-10 16:36:56 -04003--- a/third_party/lcms/src/cmsplugin.c
4+++ b/third_party/lcms/src/cmsplugin.c
kcwu85fcf942016-10-17 06:13:11 -07005@@ -179,6 +179,8 @@ cmsBool CMSEXPORT _cmsReadFloat32Number(cmsIOHANDLER* io, cmsFloat32Number* n)
6
7 tmp = _cmsAdjustEndianess32(tmp);
Nicolas Pena0bd84722017-08-14 10:36:01 -04008 *n = *(cmsFloat32Number*) (void*) &tmp;
kcwu85fcf942016-10-17 06:13:11 -07009+ if (isnan(*n))
10+ return FALSE;
11 }
12 return TRUE;
13 }