mirror of
https://github.com/imgproxy/imgproxy.git
synced 2024-11-24 08:12:38 +02:00
Add check for duplicated SOI markers in JPEG
This commit is contained in:
parent
d7ab8890a7
commit
9c8293a2a0
@ -92,6 +92,10 @@ func DecodeJpegMeta(rr io.Reader) (Meta, error) {
|
||||
return nil, JpegFormatError("missing SOF marker")
|
||||
}
|
||||
|
||||
if marker == jpegSoiMarker {
|
||||
return nil, JpegFormatError("two SOI markers")
|
||||
}
|
||||
|
||||
if jpegRst0Marker <= marker && marker <= jpegRst7Marker {
|
||||
continue
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user