Allocate large structure using malloc instead of stack.
This commit is contained in:
parent
291ad22e84
commit
7e1ee2d386
@ -3442,9 +3442,12 @@ static int stbi__jpeg_info_raw(stbi__jpeg *j, int *x, int *y, int *comp)
|
|||||||
|
|
||||||
static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp)
|
static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp)
|
||||||
{
|
{
|
||||||
stbi__jpeg j;
|
int result;
|
||||||
j.s = s;
|
stbi__jpeg* j = (stbi__jpeg*) (stbi__malloc(sizeof(stbi__jpeg)));
|
||||||
return stbi__jpeg_info_raw(&j, x, y, comp);
|
j->s = s;
|
||||||
|
result = stbi__jpeg_info_raw(j, x, y, comp);
|
||||||
|
STBI_FREE(j);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user