MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / stbi__malloc_mad4

Function stbi__malloc_mad4

Source/Utils/stb_image.h:1061–1065  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1059
1060#if !defined(STBI_NO_LINEAR) || !defined(STBI_NO_HDR) || !defined(STBI_NO_PNM)
1061static void *stbi__malloc_mad4(int a, int b, int c, int d, int add)
1062{
1063 if (!stbi__mad4sizes_valid(a, b, c, d, add)) return NULL;
1064 return stbi__malloc(a*b*c*d + add);
1065}
1066#endif
1067
1068// returns 1 if the sum of two signed ints is valid (between -2^31 and 2^31-1 inclusive), 0 on overflow.

Callers 3

stbi__ldr_to_hdrFunction · 0.85
stbi__hdr_loadFunction · 0.85
stbi__pnm_loadFunction · 0.85

Calls 2

stbi__mad4sizes_validFunction · 0.85
stbi__mallocFunction · 0.85

Tested by

no test coverage detected