mirror of https://github.com/nothings/stb.git
stb_image: JPEG: Accept non-zero junk bytes at the end of image data
This commit is contained in:
parent
59a5a155b4
commit
6f5677946c
|
@ -3123,8 +3123,6 @@ static int stbi__decode_jpeg_image(stbi__jpeg *j)
|
|||
if (x == 255) {
|
||||
j->marker = stbi__get8(j->s);
|
||||
break;
|
||||
} else if (x != 0) {
|
||||
return stbi__err("junk before marker", "Corrupt JPEG");
|
||||
}
|
||||
}
|
||||
// if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0
|
||||
|
|
Loading…
Reference in New Issue