Add nullptr check and return invalid param 46/79146/12
authorMateusz Forc <m.forc@samsung.com>
Fri, 8 Jul 2016 10:38:21 +0000 (12:38 +0200)
committerLukasz Pawelczyk <l.pawelczyk@samsung.com>
Mon, 11 Jul 2016 13:37:56 +0000 (06:37 -0700)
commit1c69850c1e0b8deb5a25542182a372dab6bb0b0e
tree20601e4e2603993c1ee905bd479a777efd3eb274
parent19a43a232b6eeff11a965c3879308bf80c7e9803
Add nullptr check and return invalid param

Add nullptr check for *iv_bit_len in yaca_encrypt_get_iv_bit_length().

Change return from YACA_ERROR_INTERNAL to YACA_INVALID_PARAMETER
in encrypt_get_algorithm for invalid param case

Change-Id: I804ca0af5d733aec2097566411e54b224391df5b
src/encrypt.c