staging: xgifb: validate the mode against video memory size
authorAaro Koskinen <aaro.koskinen@iki.fi>
Tue, 11 Sep 2012 21:44:37 +0000 (00:44 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Sep 2012 16:45:58 +0000 (09:45 -0700)
It's possible to select video mode that exceeds the available video
memory. This is potentially dangerous, fix by adding a check.

The patch fixes system hangs seen occasionally when playing random videos
with mplayer.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

No differences found