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:
9262a1f
)
Enforce NULL data for empty digest input
52/76352/1
author
Krzysztof Jackiewicz
<k.jackiewicz@samsung.com>
Thu, 23 Jun 2016 12:15:36 +0000
(14:15 +0200)
committer
Krzysztof Jackiewicz
<k.jackiewicz@samsung.com>
Thu, 23 Jun 2016 12:15:36 +0000
(14:15 +0200)
Change-Id: I7fbd82b9aea2c9c2b712d72e09ac014d2dcf6a2f
src/simple.c
patch
|
blob
|
history
diff --git
a/src/simple.c
b/src/simple.c
index a621281b5c9bc69a977a661e8af0a65283e6e2e6..f8f553738bf6c7454e666bc67bf0b7f79355f0c4 100644
(file)
--- a/
src/simple.c
+++ b/
src/simple.c
@@
-44,7
+44,8
@@
API int yaca_simple_calculate_digest(yaca_digest_algorithm_e algo,
char *ldigest = NULL;
size_t ldigest_len;
- if ((data == NULL && data_len > 0) || digest == NULL || digest_len == NULL)
+ if ((data == NULL && data_len > 0) || (data != NULL && data_len == 0) ||
+ digest == NULL || digest_len == NULL)
return YACA_ERROR_INVALID_PARAMETER;
ret = yaca_digest_initialize(&ctx, algo);