summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/gui/wps_parser.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/apps/gui/wps_parser.c b/apps/gui/wps_parser.c
index be3d2fb882..a791440d0e 100644
--- a/apps/gui/wps_parser.c
+++ b/apps/gui/wps_parser.c
@@ -564,9 +564,7 @@ static int parse_viewport(const char *wps_bufptr,
564#ifdef HAVE_REMOTE_LCD 564#ifdef HAVE_REMOTE_LCD
565 if (wps_data->remote_wps) 565 if (wps_data->remote_wps)
566 { 566 {
567 if ((vp->x >= LCD_REMOTE_WIDTH) || 567 if (((vp->x + vp->width) >= LCD_REMOTE_WIDTH) ||
568 ((vp->x + vp->width) >= LCD_REMOTE_WIDTH) ||
569 (vp->y >= LCD_REMOTE_HEIGHT) ||
570 ((vp->y + vp->height) >= LCD_REMOTE_HEIGHT)) 568 ((vp->y + vp->height) >= LCD_REMOTE_HEIGHT))
571 { 569 {
572 return WPS_ERROR_INVALID_PARAM; 570 return WPS_ERROR_INVALID_PARAM;
@@ -575,8 +573,7 @@ static int parse_viewport(const char *wps_bufptr,
575 else 573 else
576#else 574#else
577 { 575 {
578 if ((vp->x >= LCD_WIDTH) || 576 if (((vp->x + vp->width) >= LCD_WIDTH) ||
579 (vp->y >= LCD_HEIGHT) ||
580 ((vp->y + vp->height) >= LCD_HEIGHT)) 577 ((vp->y + vp->height) >= LCD_HEIGHT))
581 { 578 {
582 return WPS_ERROR_INVALID_PARAM; 579 return WPS_ERROR_INVALID_PARAM;