| 1037 | // returns 1 if "a*b*c*d + add" has no negative terms/factors and doesn't overflow |
| 1038 | #if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) || !defined(STBI_NO_PNM) |
| 1039 | static int stbi__mad4sizes_valid(int a, int b, int c, int d, int add) |
| 1040 | { |
| 1041 | return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a*b, c) && |
| 1042 | stbi__mul2sizes_valid(a*b*c, d) && stbi__addsizes_valid(a*b*c*d, add); |
| 1043 | } |
| 1044 | #endif |
| 1045 | |
| 1046 | #if !defined(STBI_NO_JPEG) || !defined(STBI_NO_PNG) || !defined(STBI_NO_TGA) || !defined(STBI_NO_HDR) |
no test coverage detected