drivers/display/lcd160cr: Add check that JPEG size is less than 65536.

This commit is contained in:
Damien George 2017-02-27 18:39:35 +11:00
parent f4a12dca58
commit 528aeb3bf3

View File

@ -446,6 +446,8 @@ class LCD160CR:
self._send(s)
def jpeg_start(self, l):
if l > 0xffff:
raise ValueError('length must be 65535 or less')
self.oflush()
self._fcmd2('<BBH', 0x6a, l)