提交 6f567794 编写于 作者: J Jeremy Sawicki

stb_image: JPEG: Accept non-zero junk bytes at the end of image data

上级 59a5a155
...@@ -3123,8 +3123,6 @@ static int stbi__decode_jpeg_image(stbi__jpeg *j) ...@@ -3123,8 +3123,6 @@ static int stbi__decode_jpeg_image(stbi__jpeg *j)
if (x == 255) { if (x == 255) {
j->marker = stbi__get8(j->s); j->marker = stbi__get8(j->s);
break; 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 // if we reach eof without hitting a marker, stbi__get_marker() below will fail and we'll eventually return 0
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册