]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: sanity check ioctl input
authorDan Carpenter <error27@gmail.com>
Wed, 8 Sep 2010 19:39:56 +0000 (21:39 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Sun, 24 Oct 2010 22:52:49 +0000 (23:52 +0100)
commitb760a0b9df473dd9f3d5b984b769f8a611100873
tree57a69440a6ed3045253df626afe726cd21e47ab3
parent8703ee63ab071d210eb2871f88eceea06d70fcf7
mtd: sanity check ioctl input

If "ur_idx" is wrong we could go past the end of the array.  The
"ur_idx" comes from root so it's not a huge deal, but adding a sanity
check makes the code more robust.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/mtdchar.c