mirror of
https://github.com/golang/go
synced 2024-11-23 23:10:09 -07:00
image/jpeg: reject multiple Start-Of-Frame markers.
Fixes #10389 Change-Id: Id1c687122751f9317041d9e425d03b267a26c6de Reviewed-on: https://go-review.googlesource.com/8681 Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
parent
c844bf4cfc
commit
eb44082915
@ -298,6 +298,9 @@ func (d *decoder) ignore(n int) error {
|
||||
|
||||
// Specified in section B.2.2.
|
||||
func (d *decoder) processSOF(n int) error {
|
||||
if d.nComp != 0 {
|
||||
return FormatError("multiple SOF markers")
|
||||
}
|
||||
switch n {
|
||||
case 6 + 3*1: // Grayscale image.
|
||||
d.nComp = 1
|
||||
|
Loading…
Reference in New Issue
Block a user