UBI: fix out of bounds write
authorBrian Norris <computersforpeace@gmail.com>
Sat, 28 Feb 2015 10:23:26 +0000 (02:23 -0800)
committerRichard Weinberger <richard@nod.at>
Thu, 26 Mar 2015 11:07:17 +0000 (12:07 +0100)
commitd74adbdb9abf0d2506a6c4afa534d894f28b763f
tree0d5f9eab00ec5a117e8c665dd249456978e7decd
parent8eef7d70f7c6772c3490f410ee2bceab3b543fa1
UBI: fix out of bounds write

If aeb->len >= vol->reserved_pebs, we should not be writing aeb into the
PEB->LEB mapping.

Caught by Coverity, CID #711212.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
drivers/mtd/ubi/eba.c