projects
/
platform
/
core
/
appfw
/
aul-1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea1271b
)
Use strndup() instread of strdup()
58/243358/1
author
Hwankyu Jhun
<h.jhun@samsung.com>
Mon, 7 Sep 2020 05:08:45 +0000
(14:08 +0900)
committer
Hwankyu Jhun
<h.jhun@samsung.com>
Mon, 7 Sep 2020 05:08:45 +0000
(14:08 +0900)
Calling strlen(str1) is not equal to str1_len.
Change-Id: I0cda3073b37aa27e3281140c5c19ec37ed3b60bd
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/service_db.c
patch
|
blob
|
history
diff --git
a/src/service_db.c
b/src/service_db.c
index
0fc0f6e
..
0824f22
100644
(file)
--- a/
src/service_db.c
+++ b/
src/service_db.c
@@
-82,11
+82,11
@@
static int __collate_appsvc(void *ucol, int str1_len, const void *str1,
if (str1 == NULL || str2 == NULL)
return -1;
- dup_str1 = str
dup(str1
);
+ dup_str1 = str
ndup(str1, str1_len
);
if (dup_str1 == NULL)
return -1;
- dup_str2 = str
dup(str2
);
+ dup_str2 = str
ndup(str2, str2_len
);
if (dup_str2 == NULL) {
free(dup_str1);
return -1;