iio: proximity: as3935: fix buffer stack trashing
authorMatt Ranostay <mranostay@gmail.com>
Sun, 22 May 2016 03:01:03 +0000 (20:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Jul 2016 16:47:36 +0000 (09:47 -0700)
commitc00a4987faf46e3192dab01f0486038fdaf2ca1a
treedc7cde709bbbb8d427f12ae6bb19f08114fcdd2d
parentcd4a799390a02f6265a5f34d87b828b3ffdb59ff
iio: proximity: as3935: fix buffer stack trashing

commit 37b1ba2c68cfbe37f5f45bb91bcfaf2b016ae6a1 upstream.

Buffer wasn't of a valid size to allow the timestamp, and correct padding.
This patchset also moves the buffer off the stack, and onto the heap.

Cc: george.mccollister@gmail.com
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/proximity/as3935.c