From fc5db93eee46b6cf45bdcdd45390bacd7de15d5b Mon Sep 17 00:00:00 2001 From: arighi Date: Tue, 27 Apr 2010 09:17:09 +0000 Subject: [PATCH] rit128x96: correctly check for out-of-bounds pixels in lcd_start_blit(). git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3524 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/drv/lcd_rit128x96.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bertos/drv/lcd_rit128x96.c b/bertos/drv/lcd_rit128x96.c index 9fce45c5..03140ba5 100644 --- a/bertos/drv/lcd_rit128x96.c +++ b/bertos/drv/lcd_rit128x96.c @@ -131,7 +131,8 @@ static void lcd_start_blit(uint8_t x, uint8_t y, uint8_t width, uint8_t height) { uint8_t buffer[3]; - ASSERT(width == LCD_WIDTH && height == LCD_HEIGHT); + ASSERT((x + width) <= LCD_WIDTH); + ASSERT((y + height) <= LCD_HEIGHT); /* Enter command mode */ LCD_SET_COMMAND(); -- 2.25.1