Bluetooth: Validate data size before accessing mgmt commands
authorSzymon Janc <szymon.janc@tieto.com>
Fri, 25 Feb 2011 18:05:49 +0000 (19:05 +0100)
committerGustavo F. Padovan <padovan@profusion.mobi>
Sun, 27 Feb 2011 19:57:07 +0000 (16:57 -0300)
commitbdce7bafb786701004b2055e15d6ff4b3be678f3
tree8293fd5214b73b1398ce0cd7386645f736b9b01e
parent4e51eae9cdda4bf096e73a4ebe23f8f96a17596a
Bluetooth: Validate data size before accessing mgmt commands

Crafted (too small) data buffer could result in reading data outside of buffer.
Validate buffer size and return EINVAL if size is wrong.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Acked-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/mgmt.c