Merge branch 'dnl-segment' of https://github.com/jeremysawicki/stb into working
This commit is contained in:
commit
7e389e85c1
@ -3049,6 +3049,11 @@ static int stbi__decode_jpeg_image(stbi__jpeg *j)
|
|||||||
}
|
}
|
||||||
// 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
|
||||||
}
|
}
|
||||||
|
} else if (stbi__DNL(m)) {
|
||||||
|
int Ld = stbi__get16be(j->s);
|
||||||
|
stbi__uint32 NL = stbi__get16be(j->s);
|
||||||
|
if (Ld != 4) stbi__err("bad DNL len", "Corrupt JPEG");
|
||||||
|
if (NL != j->s->img_y) stbi__err("bad DNL height", "Corrupt JPEG");
|
||||||
} else {
|
} else {
|
||||||
if (!stbi__process_marker(j, m)) return 0;
|
if (!stbi__process_marker(j, m)) return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user