staging: ozwpan: prevent overflow in oz_cdev_write()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 29 Oct 2013 19:07:47 +0000 (22:07 +0300)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Oct 2013 19:24:49 +0000 (12:24 -0700)
commitc2c65cd2e14ada6de44cb527e7f1990bede24e15
tree0f86f684fe16bd0bb933387b4d0052416df670bc
parent201f99f170df14ba52ea4c52847779042b7a623b
staging: ozwpan: prevent overflow in oz_cdev_write()

We need to check "count" so we don't overflow the ei->data buffer.

Reported-by: Nico Golde <nico@ngolde.de>
Reported-by: Fabian Yamaguchi <fabs@goesec.de>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/staging/ozwpan/ozcdev.c