drbd: Ensure that data_size is not 0 before using data_size-1 as index
authorPhilipp Reisner <philipp.reisner@linbit.com>
Fri, 6 Apr 2012 10:08:51 +0000 (12:08 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 8 Nov 2012 15:58:26 +0000 (16:58 +0100)
commite4bad1bcacd82b3d7727e30db26be3580bdc722a
tree8c276ba45b16777b72002d05fdf64f3bccd2eb02
parenta1096a6e9da7885ec9e11d93aa459685a33fa4d9
drbd: Ensure that data_size is not 0 before using data_size-1 as index

This could be exploited by a peer which runs modified code.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_receiver.c