OSDN Git Service

stating: ccree: fix allocation of void sized buf
authorGilad Ben-Yossef <gilad@benyossef.com>
Sun, 7 Jan 2018 12:14:34 +0000 (12:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Jan 2018 15:29:36 +0000 (16:29 +0100)
commit2392b84fb2f8daf71e70dd13101ec70ff636a3d3
tree74e98618cf06d07e0ea217f4aaa2e8768f7c3888
parentabb8492b2a24b30ce94df3f5c5e47d845506d68a
stating: ccree: fix allocation of void sized buf

We were allocating buffers using sizeof(*struct->field) where field was
type void.  Fix it by having a local variable with the real type.

Cc: stable@vger.kernel.org
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ccree/ssi_ivgen.c
drivers/staging/ccree/ssi_sram_mgr.c