Nicolas Pena | f752039 | 2017-08-10 16:36:56 -0400 | [diff] [blame] | 1 | diff --git a/third_party/lcms/src/cmsplugin.c b/third_party/lcms/src/cmsplugin.c |
Nicolas Pena | 0bd8472 | 2017-08-14 10:36:01 -0400 | [diff] [blame] | 2 | index 79b145d2d..29ddd9a49 100644 |
Nicolas Pena | f752039 | 2017-08-10 16:36:56 -0400 | [diff] [blame] | 3 | --- a/third_party/lcms/src/cmsplugin.c |
| 4 | +++ b/third_party/lcms/src/cmsplugin.c |
kcwu | 85fcf94 | 2016-10-17 06:13:11 -0700 | [diff] [blame] | 5 | @@ -179,6 +179,8 @@ cmsBool CMSEXPORT _cmsReadFloat32Number(cmsIOHANDLER* io, cmsFloat32Number* n) |
| 6 | |
| 7 | tmp = _cmsAdjustEndianess32(tmp); |
Nicolas Pena | 0bd8472 | 2017-08-14 10:36:01 -0400 | [diff] [blame] | 8 | *n = *(cmsFloat32Number*) (void*) &tmp; |
kcwu | 85fcf94 | 2016-10-17 06:13:11 -0700 | [diff] [blame] | 9 | + if (isnan(*n)) |
| 10 | + return FALSE; |
| 11 | } |
| 12 | return TRUE; |
| 13 | } |