projects
/
platform
/
core
/
security
/
yaca.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f2b88db
)
Do not segfault on contexts without get_output_length (e.g. verify)
20/75020/2
author
Lukasz Pawelczyk
<l.pawelczyk@samsung.com>
Thu, 16 Jun 2016 09:46:08 +0000
(11:46 +0200)
committer
Lukasz Pawelczyk
<l.pawelczyk@samsung.com>
Thu, 16 Jun 2016 11:00:10 +0000
(13:00 +0200)
Change-Id: I0541f8f685b5d02370e67cabf3ea89f5794f0ee5
src/crypto.c
patch
|
blob
|
history
diff --git
a/src/crypto.c
b/src/crypto.c
index
40f6a99
..
e4c1f29
100644
(file)
--- a/
src/crypto.c
+++ b/
src/crypto.c
@@
-291,7
+291,8
@@
API int yaca_context_destroy(yaca_context_h ctx)
API int yaca_context_get_output_length(const yaca_context_h ctx,
size_t input_len, size_t *output_len)
{
- if (ctx == YACA_CONTEXT_NULL || output_len == NULL)
+ if (ctx == YACA_CONTEXT_NULL || output_len == NULL ||
+ ctx->get_output_length == NULL)
return YACA_ERROR_INVALID_PARAMETER;
return ctx->get_output_length(ctx, input_len, output_len);