File tree Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -409,6 +409,10 @@ impl<R: Read> Decoder<R> {
409
409
previous_marker = marker;
410
410
}
411
411
412
+ if self . frame . is_none ( ) {
413
+ return Err ( Error :: Format ( "end of image encountered before frame" . to_owned ( ) ) ) ;
414
+ }
415
+
412
416
let frame = self . frame . as_ref ( ) . unwrap ( ) ;
413
417
414
418
// If we're decoding a progressive jpeg and a component is unfinished, render what we've got
Original file line number Diff line number Diff line change @@ -7,3 +7,4 @@ derive-huffman-codes-overflow.jpg | Found by Pascal Hertleif (@killercup) while
7
7
missing-sof.jpg | Found by Corey Farwell (@frewsxcv ) when fuzz testing
8
8
extraneous-bytes-after-sos.jpg | Scan from brother DSmobile 920DW provided by Filip Lundborg (@filipl )
9
9
missing-sos.jpg | Generated in GIMP and manually edited by John Reynolds (@quilan1 )
10
+ missing-frame-image-1410.jpg | Found by @frewsxcv when fuzzing
You can’t perform that action at this time.
0 commit comments