From: sungwook79.park Date: Wed, 3 Aug 2016 10:10:57 +0000 (+0900) Subject: Fix to check privilege issue X-Git-Tag: submit/tizen/20160805.054246~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=80b2a5cfde96d2385808aa577657c84647325385;p=platform%2Fcore%2Fapi%2Finputmethod-manager.git Fix to check privilege issue Change-Id: I27ac0b6a735ffcf94f161f813792adbb9593ab98 Signed-off-by: sungwook79.park --- diff --git a/src/privilege_checker.cpp b/src/privilege_checker.cpp index 014bb56..2b2ae90 100644 --- a/src/privilege_checker.cpp +++ b/src/privilege_checker.cpp @@ -44,13 +44,14 @@ bool check_privilege(const char *uid, const char *privilege) { FILE *fp = NULL; - char smack_label[1024] = "/proc/self/attr/current"; + char label_path[1024] = "/proc/self/attr/current"; + char smack_label[1024] = {'\0',}; if (!p_cynara) { return false; } - fp = fopen("/proc/self/attr/current", "r"); + fp = fopen(label_path, "r"); if (fp != NULL) { if (fread(smack_label, 1, sizeof(smack_label), fp) <= 0); fclose(fp);