MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / stbi__mad4sizes_valid

Function stbi__mad4sizes_valid

include/stb/stb_image.h:1039–1043  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)
1039static 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)

Callers 3

stbi__malloc_mad4Function · 0.85
stbi__hdr_loadFunction · 0.85
stbi__pnm_loadFunction · 0.85

Calls 2

stbi__mul2sizes_validFunction · 0.85
stbi__addsizes_validFunction · 0.85

Tested by

no test coverage detected