From 873fb30bc5e3ff620fe8041e7c59f924b116fa04 Mon Sep 17 00:00:00 2001 From: "songwei.li" Date: Wed, 30 Jul 2025 15:57:05 +0800 Subject: [PATCH] FIX: 3mf files containing small thumbnails cause crash Fix the issue that 3mf files containing small thumbnails cause the print page to crash. Due to m_cur_input_thumbnail_data has small size which caused array out of bounds and crash. jira: STUDIO-13731 Change-Id: Ie3c30287265f635e6afb2b1157c97c5b6863d54e (cherry picked from commit adffd16e1fbbcba0f1bc33ebd6112e57c88f30e7) --- src/slic3r/GUI/SelectMachine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slic3r/GUI/SelectMachine.cpp b/src/slic3r/GUI/SelectMachine.cpp index 2955a97f50..1318a3155d 100644 --- a/src/slic3r/GUI/SelectMachine.cpp +++ b/src/slic3r/GUI/SelectMachine.cpp @@ -4031,7 +4031,7 @@ void SelectMachineDialog::record_edge_pixels_data() }; ThumbnailData &data = m_cur_no_light_thumbnail_data; ThumbnailData &origin_data = m_cur_input_thumbnail_data; - if (data.width > 0 && data.height > 0) { + if (data.width > 0 && data.height > 0 && (data.width == origin_data.width && data.height == origin_data.height) ) { m_edge_pixels.resize(data.width * data.height); for (unsigned int r = 0; r < data.height; ++r) { unsigned int rr = (data.height - 1 - r) * data.width;