projects
/
platform
/
core
/
uifw
/
isf.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a7be6f
)
Fix crash issue when scim_get_home_dir() is called
89/168889/1
author
InHong Han
<inhong1.han@samsung.com>
Thu, 1 Feb 2018 02:19:36 +0000
(11:19 +0900)
committer
InHong Han
<inhong1.han@samsung.com>
Thu, 1 Feb 2018 02:26:35 +0000
(
02:26
+0000)
Change-Id: I033b2a193c1cfe4f367c788c46626f565aab29e2
ism/src/scim_utility.cpp
patch
|
blob
|
history
diff --git
a/ism/src/scim_utility.cpp
b/ism/src/scim_utility.cpp
index
ef08d1b
..
441f274
100644
(file)
--- a/
ism/src/scim_utility.cpp
+++ b/
ism/src/scim_utility.cpp
@@
-653,9
+653,12
@@
scim_get_home_dir ()
char buf [2048] = {0,};
setpwent ();
- getpwuid_r (getuid (), &pw, buf, sizeof (buf), &result);
+
int ret =
getpwuid_r (getuid (), &pw, buf, sizeof (buf), &result);
endpwent ();
+ if (ret != 0 || !result)
+ return String ("");
+
if (result && pw.pw_dir) {
home_dir = pw.pw_dir;
} else {