diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index 9475e5feb5..75b4c4298f 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c @@ -1313,10 +1313,14 @@ static int convert_viewport(struct wps_data *data, struct skin_element* element) { skin_vp->vp.font = param->data.number; } -#endif +#endif + if ((unsigned) skin_vp->vp.x >= (unsigned) display->lcdwidth || + skin_vp->vp.width + skin_vp->vp.x > display->lcdwidth || + (unsigned) skin_vp->vp.y >= (unsigned) display->lcdheight || + skin_vp->vp.height + skin_vp->vp.y > display->lcdheight) + return CALLBACK_ERROR; return CALLBACK_OK; - } static int skin_element_callback(struct skin_element* element, void* data) |