Commit 87b9e30d authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] i810_dma range check

From: Andrea Arcangeli <andrea@suse.de>

Correctly range-check an incoming-from-userspace argument.  Found by the
Stanford checker.
parent ed328082
...@@ -1275,6 +1275,9 @@ int i810_dma_mc(struct inode *inode, struct file *filp, ...@@ -1275,6 +1275,9 @@ int i810_dma_mc(struct inode *inode, struct file *filp,
return -EINVAL; return -EINVAL;
} }
if (mc.idx >= dma->buf_count || mc.idx < 0)
return -EINVAL;
i810_dma_dispatch_mc(dev, dma->buflist[mc.idx], mc.used, i810_dma_dispatch_mc(dev, dma->buflist[mc.idx], mc.used,
mc.last_render ); mc.last_render );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment