Prevent HDR info function from trashing stbi context by over-reading
This commit is contained in:
parent
5809508de3
commit
4337345c5d
@ -6017,7 +6017,7 @@ static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp)
|
|||||||
char *token;
|
char *token;
|
||||||
int valid = 0;
|
int valid = 0;
|
||||||
|
|
||||||
if (strcmp(stbi__hdr_gettoken(s,buffer), "#?RADIANCE") != 0) {
|
if (stbi__hdr_test(s) == 0) {
|
||||||
stbi__rewind( s );
|
stbi__rewind( s );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user