From 2d051ffefd85f04581d841cb624dc62f554079f0 Mon Sep 17 00:00:00 2001 From: tychovrahe Date: Tue, 31 Dec 2024 15:59:47 +0100 Subject: [PATCH] fix(core): fix jpeg size parsing [no changelog] --- core/embed/rust/src/ui/display/image.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/embed/rust/src/ui/display/image.rs b/core/embed/rust/src/ui/display/image.rs index cbca9339d5..f340efcd73 100644 --- a/core/embed/rust/src/ui/display/image.rs +++ b/core/embed/rust/src/ui/display/image.rs @@ -153,8 +153,8 @@ impl JpegInfo { ofs += match marker { M_SOI => 0, M_SOF0 => { - let w = image.read_u16_be(ofs + 3)? as i16; - let h = image.read_u16_be(ofs + 5)? as i16; + let h = image.read_u16_be(ofs + 3)? as i16; + let w = image.read_u16_be(ofs + 5)? as i16; // Number of components let nc = image.read_u8(ofs + 7)?; if (nc != 1) && (nc != 3) {