From 344c3f73d59c159f939ebdf01f2d89654727499d Mon Sep 17 00:00:00 2001 From: Jeremy Sawicki Date: Thu, 2 Mar 2017 23:10:03 -0800 Subject: [PATCH] stb_image: JPEG: Accept fill bytes in stbi__grow_buffer_unsafe --- stb_image.h | 1 + 1 file changed, 1 insertion(+) diff --git a/stb_image.h b/stb_image.h index 3940f38..282f358 100644 --- a/stb_image.h +++ b/stb_image.h @@ -1851,6 +1851,7 @@ static void stbi__grow_buffer_unsafe(stbi__jpeg *j) int b = j->nomore ? 0 : stbi__get8(j->s); if (b == 0xff) { int c = stbi__get8(j->s); + while (c == 0xff) c = stbi__get8(j->s); if (c != 0) { j->marker = (unsigned char) c; j->nomore = 1;