diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-01-02 23:38:16 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-01-02 23:38:16 +0000 |
commit | 349677168c1316d7006d1f7257975355d87dc831 (patch) | |
tree | 81251dcf38f0602e400675d3b01cd5416f854a96 /drivers | |
parent | b7c87430921baa35893912f547e2ffe8b392d7f9 (diff) | |
download | mpv-349677168c1316d7006d1f7257975355d87dc831.tar.bz2 mpv-349677168c1316d7006d1f7257975355d87dc831.tar.xz |
lastminute divbyzero fix by Attila Kinali ;)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3960 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mga_vid.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mga_vid.c b/drivers/mga_vid.c index 655bdd7a9f..accdb2721b 100644 --- a/drivers/mga_vid.c +++ b/drivers/mga_vid.c @@ -607,6 +607,11 @@ static int mga_vid_set_config(mga_vid_config_t *config) printk(KERN_DEBUG "mga_vid: Setting up a %dx%d+%d+%d video window (src %dx%d) format %X\n", dw, dh, x, y, sw, sh, config->format); + if(sw<4 || sh<4 || dw<4 || dh<4){ + printk(KERN_ERR "mga_vid: Invalid src/dest dimenstions\n"); + return -1; + } + //FIXME check that window is valid and inside desktop //FIXME figure out a better way to allocate memory on card |