From: Kwangyoun Kim Date: Wed, 3 Aug 2016 08:34:53 +0000 (+0900) Subject: Fix bug about checking privilege X-Git-Tag: accepted/tizen/common/20160824.155300~1^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F23%2F82423%2F1;p=platform%2Fcore%2Fuifw%2Fstt.git Fix bug about checking privilege Change-Id: Ie8c44e7a494ef1f5d928437ab61fbf8ddce32c0d Signed-off-by: Kwangyoun Kim --- diff --git a/client/stt.c b/client/stt.c old mode 100755 new mode 100644 index 34e95cf..daf4ce3 --- a/client/stt.c +++ b/client/stt.c @@ -92,13 +92,14 @@ static int __check_privilege_initialize() static int __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(smack_label, "r"); + fp = fopen(label_path, "r"); if (fp != NULL) { if (fread(smack_label, 1, sizeof(smack_label), fp) <= 0) SLOG(LOG_ERROR, TAG_STTC, "[ERROR] fail to fread");