From ae6b588981daf4838bda36f046a79a61278d2d3e Mon Sep 17 00:00:00 2001 From: Roel Kluin <12o3l@tiscali.nl> Date: Wed, 23 Jul 2008 21:31:18 -0700 Subject: [PATCH] --- yaml --- r: 105529 b: refs/heads/master c: 091c82c01295719d47b89b38d24e41ad2066ead8 h: refs/heads/master i: 105527: d649a75c2b0a5a5a8c4404948df8d6ad50d7ab68 v: v3 --- [refs] | 2 +- trunk/drivers/video/amifb.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index f5197a2928a3..e62aa05b017a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 816664f88707b03fde24fb09759d569ed42406cb +refs/heads/master: 091c82c01295719d47b89b38d24e41ad2066ead8 diff --git a/trunk/drivers/video/amifb.c b/trunk/drivers/video/amifb.c index 45c154ade9ca..0c549aa1cf87 100644 --- a/trunk/drivers/video/amifb.c +++ b/trunk/drivers/video/amifb.c @@ -2048,13 +2048,16 @@ static void amifb_copyarea(struct fb_info *info, width = x2 - dx; height = y2 - dy; + if (area->sx + dx < area->dx || area->sy + dy < area->dy) + return; + /* update sx,sy */ sx = area->sx + (dx - area->dx); sy = area->sy + (dy - area->dy); /* the source must be completely inside the virtual screen */ - if (sx < 0 || sy < 0 || (sx + width) > info->var.xres_virtual || - (sy + height) > info->var.yres_virtual) + if (sx + width > info->var.xres_virtual || + sy + height > info->var.yres_virtual) return; if (dy > sy || (dy == sy && dx > sx)) {