Prevent HDR info function from trashing stbi context by over-reading

pull/204/head
baldurk 2015-11-14 13:14:26 +01:00
parent 5809508de3
commit 4337345c5d
1 changed files with 1 additions and 1 deletions

View File

@ -6017,7 +6017,7 @@ static int stbi__hdr_info(stbi__context *s, int *x, int *y, int *comp)
char *token;
int valid = 0;
if (strcmp(stbi__hdr_gettoken(s,buffer), "#?RADIANCE") != 0) {
if (stbi__hdr_test(s) == 0) {
stbi__rewind( s );
return 0;
}