aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaras Kondratiuk <taras.kondratiuk@linaro.org>2015-02-27 00:48:16 +0200
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-02-27 09:40:21 +0300
commitc62a66cc893be0bbc93315ef310dd0678cd12a27 (patch)
treef555d34dcb83068d5f1ebcc65c825c30004d76dd
parentf0ff8d832ddd6c90d37cc9d5d9424cfe7c38ef0a (diff)
linux-generic: crypto: check 'result' pointer
Check 'result' pointer before dereferencing it in case of synchronous operation. Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> Reviewed-by: Robert King <robking@cisco.com> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
-rw-r--r--platform/linux-generic/odp_crypto.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/platform/linux-generic/odp_crypto.c b/platform/linux-generic/odp_crypto.c
index e307e7c32..3d5910882 100644
--- a/platform/linux-generic/odp_crypto.c
+++ b/platform/linux-generic/odp_crypto.c
@@ -435,6 +435,8 @@ odp_crypto_operation(odp_crypto_op_params_t *params,
*posted = 1;
} else {
/* Synchronous, simply return results */
+ if (!result)
+ return -1;
*result = local_result;
/* Indicate to caller operation was sync */