std/jpeg: add "#unsupported scan count"

Updates https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=59540
This commit is contained in:
Nigel Tao committed 2023-06-04 15:46:18 +10:00
1 parent 0b18d43e4f
commit 5edfe45e15
2 files changed
+11

No files matched your search

+5
View File
@@ -32,6 +32,7 @@ pub status "#unsupported marker"
pub status "#unsupported precision (12 bits)"
pub status "#unsupported precision (16 bits)"
pub status "#unsupported precision"
pub status "#unsupported scan count"
pri status "#internal error: inconsistent decoder state"
@@ -1147,6 +1148,10 @@ pri func decoder.decode_sos?(dst: ptr base.pixel_buffer, src: base.io_reader, wo
var stride : base.u64[..= 0x1_0008]
var offset : base.u64
if this.scan_count >= 64 {
return "#unsupported scan count"
}
this.prepare_scan?(src: args.src)
// Reset.