Skip to content

Commit 528aeb3

Browse files
committed
drivers/display/lcd160cr: Add check that JPEG size is less than 65536.
1 parent f4a12dc commit 528aeb3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/display/lcd160cr.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,8 @@ def set_scroll_buf(self, s):
446446
self._send(s)
447447

448448
def jpeg_start(self, l):
449+
if l > 0xffff:
450+
raise ValueError('length must be 65535 or less')
449451
self.oflush()
450452
self._fcmd2('<BBH', 0x6a, l)
451453

0 commit comments

Comments
 (0)