Change-Id: I87f8ff2bc6e5cbbe395d8fc6666329cbf580221f
Signed-off-by: sungwook79.park <sungwook79.park@samsung.com>
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)
LOGW("Error : fread");