Change-Id: I27ac0b6a735ffcf94f161f813792adbb9593ab98
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("/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);