Ville Syrjälä schrieb:
quoted
So here we have to check the whether the x/yoffset is smaller than zero. If the offset is smaller than zero, in the driver, we should not move the virtual screen any more.
Checking for overflow will catch you buggy application's negative
values too.
That's true, but the problem lies in the current implementation first
adding the resolution, which results in small negative [0 to
-resolution] values (=large positives) being accepted as they overflow
during add and become small positive values.
I'd recommend changing
var->yoffset + yres > info->var.yres_virtual ||
var->xoffset + info->var.xres > info->var.xres_virtual
to
var->yoffset > info->var.yres_virtual - yres ||
var->xoffset > info->var.xres_virtual - info->var.xres
Greetings,
Florian Tobias Schandinat
------------------------------------------------------------------------------