From 1188157a3eb56600043c79cee22ff054738bd3fe Mon Sep 17 00:00:00 2001 From: Mark Thompson <129641948+NotherNgineer@users.noreply.github.com> Date: Sat, 5 Aug 2023 10:14:18 -0500 Subject: [PATCH] Reject bmp images that aren't 240 pixels wide (#1351) --- firmware/common/lcd_ili9341.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/firmware/common/lcd_ili9341.cpp b/firmware/common/lcd_ili9341.cpp index 763af047d..616d2018e 100644 --- a/firmware/common/lcd_ili9341.cpp +++ b/firmware/common/lcd_ili9341.cpp @@ -456,6 +456,9 @@ bool ILI9341::drawBMP2(const ui::Point p, const std::filesystem::path& file) { width = bmp_header.width; height = bmp_header.height; + if (width != 240) + return false; + file_pos = bmp_header.image_data; py = height + 16;