Преглед изворни кода

stb_image: JPEG: Accept fill bytes in stbi__grow_buffer_unsafe

Jeremy Sawicki пре 8 година
родитељ
комит
344c3f73d5
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      stb_image.h

+ 1 - 0
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;