projects
/
platform
/
core
/
base
/
bundle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4fe0c3a
)
Fix static analysis issue
49/218249/2
author
Inkyun Kil
<inkyun.kil@samsung.com>
Thu, 21 Nov 2019 00:29:33 +0000
(09:29 +0900)
committer
Inkyun Kil
<inkyun.kil@samsung.com>
Thu, 21 Nov 2019 00:33:49 +0000
(09:33 +0900)
Change-Id: Id09fa513a35be23af3049f9c499077939f54ab08
src/keyval_array.c
patch
|
blob
|
history
diff --git
a/src/keyval_array.c
b/src/keyval_array.c
index
a9087c5
..
6dddc35
100644
(file)
--- a/
src/keyval_array.c
+++ b/
src/keyval_array.c
@@
-207,6
+207,9
@@
int keyval_array_set_element(keyval_array_t *kva, int idx, void *val, size_t siz
keyval_t *kv = (keyval_t *)kva;
char *str;
+ if (size <= 0)
+ return BUNDLE_ERROR_INVALID_PARAMETER;
+
/* An element is already exist in the idx! */
if (kva->array_val[idx]) {
/* val==NULL means 'Free this element!' */