diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /third_party/jpeg-xl/lib/jxl/frame_header.cc | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/jpeg-xl/lib/jxl/frame_header.cc')
-rw-r--r-- | third_party/jpeg-xl/lib/jxl/frame_header.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/third_party/jpeg-xl/lib/jxl/frame_header.cc b/third_party/jpeg-xl/lib/jxl/frame_header.cc index a9e79ff1b8..6648e6d8cc 100644 --- a/third_party/jpeg-xl/lib/jxl/frame_header.cc +++ b/third_party/jpeg-xl/lib/jxl/frame_header.cc @@ -397,16 +397,18 @@ Status FrameHeader::VisitFields(Visitor* JXL_RESTRICT visitor) { } else if (visitor->Conditional(frame_type == FrameType::kReferenceOnly)) { JXL_QUIET_RETURN_IF_ERROR( visitor->Bool(true, &save_before_color_transform)); + size_t xsize = custom_size_or_origin ? frame_size.xsize + : nonserialized_metadata->xsize(); + size_t ysize = custom_size_or_origin ? frame_size.ysize + : nonserialized_metadata->ysize(); if (!save_before_color_transform && - (frame_size.xsize < nonserialized_metadata->xsize() || - frame_size.ysize < nonserialized_metadata->ysize() || - frame_origin.x0 != 0 || frame_origin.y0 != 0)) { + (xsize < nonserialized_metadata->xsize() || + ysize < nonserialized_metadata->ysize() || frame_origin.x0 != 0 || + frame_origin.y0 != 0)) { return JXL_FAILURE( "non-patch reference frame with invalid crop: %" PRIuS "x%" PRIuS "%+d%+d", - static_cast<size_t>(frame_size.xsize), - static_cast<size_t>(frame_size.ysize), - static_cast<int>(frame_origin.x0), + xsize, ysize, static_cast<int>(frame_origin.x0), static_cast<int>(frame_origin.y0)); } } |