0015-sanitize-float-read.patch revision 4d3acf4ec42bf6e838f9060103aff98fbf170794
1diff --git a/third_party/lcms2-2.6/src/cmsplugin.c b/third_party/lcms2-2.6/src/cmsplugin.c 2index b95befb..4ba998b 100644 3--- a/third_party/lcms2-2.6/src/cmsplugin.c 4+++ b/third_party/lcms2-2.6/src/cmsplugin.c 5@@ -182,7 +182,9 @@ cmsBool CMSEXPORT _cmsReadFloat32Number(cmsIOHANDLER* io, cmsFloat32Number* n) 6 if (isnan(*n)) 7 return FALSE; 8 } 9- return TRUE; 10+ 11+ // fpclassify() required by C99 12+ return (fpclassify(*n) == FP_ZERO) || (fpclassify(*n) == FP_NORMAL); 13 } 14 15 16