drivers: crypto: Avoid use of tainted scalar value
Copy from user may taint the scalar value members in the respective
struct variables.
Add check for verifying the validity of the scalar value members
to avoid undefined behaviour.
Coverity ID 24040
Bug
200192571
Bug
1862381
Change-Id: I75237559409178468a6425ec3ceb4b601b21e2de
Signed-off-by: Aniruddha TVS Rao <anrao@nvidia.com>
Reviewed-on: http://git-master/r/
1329922
Reviewed-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
(cherry picked from commit
3538fb80178bce43a1f3250ac3340f0bda54de63)
Reviewed-on: https://git-master.nvidia.com/r/
1554425
GVS: Gerrit_Virtual_Submit
Tested-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>