wil6210: validate wil_pmc_alloc parameters
authorMaya Erez <qca_merez@qca.qualcomm.com>
Mon, 28 Nov 2016 11:49:01 +0000 (13:49 +0200)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 1 Dec 2016 11:20:31 +0000 (13:20 +0200)
commit1db226ffe1c2ab900cffb1d71f042e565f77775d
tree6c8ff295e6baff3146b4d740ed8bab5b9603f864
parentbb6743f7c2ffc467002dfe24bea5dedc96c7da04
wil6210: validate wil_pmc_alloc parameters

num_descriptors and descriptor_size needs to be
checked for:
1) not being negative values
2) no overflow occurs when these are multiplied
together as done in wil_pmc_read.
An overflow of two signed integers is undefined
behavior.

Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/wil6210/pmc.c