From 6f5677946c9853be9ea87bfa13facc205d27fe05 Mon Sep 17 00:00:00 2001 From: Jeremy Sawicki Date: Thu, 2 Mar 2017 23:48:02 -0800 Subject: [PATCH] stb_image: JPEG: Accept non-zero junk bytes at the end of image data --- stb_image.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/stb_image.h b/stb_image.h index 3940f38..2ba2c2e 100644 --- a/stb_image.h +++ b/stb_image.h @@ -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