mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
std/jpeg: reject 2 (not 1, 3 or 4) components
This commit is contained in:
1 parent
7d73f3cfa4
commit
ac3bd9cdba
2 files changed
+8
No files matched your search
@@ -23,6 +23,7 @@ pub status "#missing Huffman table"
|
||||
pub status "#missing Quantization table"
|
||||
pub status "#truncated input"
|
||||
pub status "#unsupported arithmetic coding"
|
||||
pub status "#unsupported color model"
|
||||
pub status "#unsupported fractional sampling"
|
||||
pub status "#unsupported hierarchical coding"
|
||||
pub status "#unsupported implicit height"
|
||||
@@ -414,6 +415,8 @@ pri func decoder.decode_sof?(src: base.io_reader) {
|
||||
c = args.src.read_u8?()
|
||||
if (c == 0) or (c > 4) {
|
||||
return "#bad SOF marker"
|
||||
} else if c == 2 {
|
||||
return "#unsupported color model"
|
||||
}
|
||||
this.num_components = c as base.u32
|
||||
if this.payload_length <> (3 * this.num_components) {
|
||||
|
||||
Reference in new issue
Block a user