summaryrefslogtreecommitdiff
path: root/src/common/tlm-utils.c
diff options
context:
space:
mode:
authorYunmi Ha <yunmi.ha@samsung.com>2016-11-30 16:37:57 +0900
committerYunmi Ha <yunmi.ha@samsung.com>2016-11-30 17:20:20 +0900
commit3c49607ce6f0b22bacc04fa7efa5603bb2752513 (patch)
tree389dd4d146954a1a01dc78039a7b46a473feeece /src/common/tlm-utils.c
parent21f31f20b2f1541f15fe06cd26fce221120dda78 (diff)
downloadtlm-3c49607ce6f0b22bacc04fa7efa5603bb2752513.tar.gz
tlm-3c49607ce6f0b22bacc04fa7efa5603bb2752513.tar.bz2
tlm-3c49607ce6f0b22bacc04fa7efa5603bb2752513.zip
- Uninitialized data is read from local variable : Add initializing logic - unreachable code : Add string length chekcing logic Change-Id: I595494f01046b69b7afec6facd0cf1701e72f965 Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Diffstat (limited to 'src/common/tlm-utils.c')
-rwxr-xr-xsrc/common/tlm-utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/tlm-utils.c b/src/common/tlm-utils.c
index 22c3ea9..cc04208 100755
--- a/src/common/tlm-utils.c
+++ b/src/common/tlm-utils.c
@@ -61,7 +61,7 @@ g_clear_string (gchar **str)
gchar *
tlm_user_get_name (uid_t user_id)
{
- struct passwd *pwent;
+ struct passwd *pwent = NULL;
struct passwd buf_pwent;
gchar *buf = NULL, *tmp = NULL, *pw_name = NULL;
gsize size = sysconf(_SC_GETPW_R_SIZE_MAX);
@@ -162,7 +162,7 @@ tlm_user_get_gid (const gchar *username)
gchar *
tlm_user_get_home_dir (const gchar *username)
{
- struct passwd *pwent;
+ struct passwd *pwent = NULL;
struct passwd buf_pwent;
gchar *buf = NULL, *tmp = NULL, *pw_dir = NULL;
gsize size = sysconf(_SC_GETPW_R_SIZE_MAX);
@@ -197,7 +197,7 @@ tlm_user_get_home_dir (const gchar *username)
gchar *
tlm_user_get_shell (const gchar *username)
{
- struct passwd *pwent;
+ struct passwd *pwent = NULL;
struct passwd buf_pwent;
gchar *buf = NULL, *tmp = NULL, *pw_shell = NULL;
gsize size = sysconf(_SC_GETPW_R_SIZE_MAX);