1
0
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:
DarthSim 2024-05-07 16:54:48 +03:00
parent d7ab8890a7
commit 9c8293a2a0

View File

@ -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
}