Merge branch 'main' into dev

This commit is contained in:
DRC
2024-05-29 10:16:05 -04:00
2 changed files with 12 additions and 3 deletions

View File

@@ -22,6 +22,15 @@ unreasonable slow-down in `jpeg_read_header()` if an application called
to decompress a JPEG image containing an excessive number of markers of that
type.
2. Hardened the default marker processor in the decompressor to guard against
an issue (exposed by 3.0 beta2[6]) whereby attempting to decompress a
specially-crafted malformed JPEG image (specifically an image with a complete
12-bit-per-component Start Of Frame segment followed by an incomplete
8-bit-per-component Start Of Frame segment) using buffered-image mode and input
prefetching caused a segfault if the `fill_input_buffer()` method in the
calling application's custom source manager incorrectly returned `FALSE` in
response to a prematurely-terminated JPEG data stream.
3.0.3
=====

View File

@@ -248,6 +248,9 @@ get_sof(j_decompress_ptr cinfo, boolean is_prog, boolean is_lossless,
jpeg_component_info *compptr;
INPUT_VARS(cinfo);
if (cinfo->marker->saw_SOF)
ERREXIT(cinfo, JERR_SOF_DUPLICATE);
cinfo->progressive_mode = is_prog;
cinfo->master->lossless = is_lossless;
cinfo->arith_code = is_arith;
@@ -265,9 +268,6 @@ get_sof(j_decompress_ptr cinfo, boolean is_prog, boolean is_lossless,
(int)cinfo->image_width, (int)cinfo->image_height,
cinfo->num_components);
if (cinfo->marker->saw_SOF)
ERREXIT(cinfo, JERR_SOF_DUPLICATE);
/* We don't support files in which the image height is initially specified */
/* as 0 and is later redefined by DNL. As long as we have to check that, */
/* might as well have a general sanity check. */