Reject bmp images that aren't 240 pixels wide (#1351)

This commit is contained in:
Mark Thompson 2023-08-05 10:14:18 -05:00 committed by GitHub
parent 2ae639412d
commit 1188157a3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;