diff options
author | Taras Kondratiuk <taras.kondratiuk@linaro.org> | 2015-02-27 00:48:16 +0200 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2015-02-27 09:40:21 +0300 |
commit | c62a66cc893be0bbc93315ef310dd0678cd12a27 (patch) | |
tree | f555d34dcb83068d5f1ebcc65c825c30004d76dd | |
parent | f0ff8d832ddd6c90d37cc9d5d9424cfe7c38ef0a (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.c | 2 |
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 */ |