mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-23 08:47:56 +01:00
std/jpeg: ignore too-short COM or APPn markers
This commit is contained in:
1 parent
408ab25f04
commit
6a9347843b
6 files changed
+94
-5
No files matched your search
@@ -49070,11 +49070,14 @@ wuffs_jpeg__decoder__do_decode_image_config(
|
||||
}
|
||||
self->private_impl.f_payload_length = t_4;
|
||||
}
|
||||
if (self->private_impl.f_payload_length < 2u) {
|
||||
if (self->private_impl.f_payload_length >= 2u) {
|
||||
self->private_impl.f_payload_length -= 2u;
|
||||
} else if ((v_marker == 254u) || ((224u <= v_marker) && (v_marker < 240u))) {
|
||||
continue;
|
||||
} else {
|
||||
status = wuffs_base__make_status(wuffs_jpeg__error__bad_marker);
|
||||
goto exit;
|
||||
}
|
||||
self->private_impl.f_payload_length -= 2u;
|
||||
}
|
||||
if (v_marker < 192u) {
|
||||
status = wuffs_base__make_status(wuffs_jpeg__error__unsupported_marker);
|
||||
|
||||
Reference in new issue
Block a user