Change-Id: I2b4df144d3350aaf4aa58efed3c0928c2b179de4
Signed-off-by: kj7.sung <kj7.sung@samsung.com>
FILE *fp = NULL;
char uid[16];
char *session = NULL;
FILE *fp = NULL;
char uid[16];
char *session = NULL;
- char smack_label[100] = "/proc/self/attr/current";
+ char smack_label[100] = {0, };
if (cynara_initialize(&cynara, NULL) != CYNARA_API_SUCCESS)
{
if (cynara_initialize(&cynara, NULL) != CYNARA_API_SUCCESS)
{
fp = fopen("/proc/self/attr/current", "r");
if (fp != NULL) {
fp = fopen("/proc/self/attr/current", "r");
if (fp != NULL) {
- if (fread(smack_label, 1, sizeof(smack_label), fp) <= 0) {
- LOCATION_LOGE("fread failed");
+ int ch = 0;
+ int idx = 0;
+ while (EOF != (ch = fgetc(fp))) {
+ smack_label[idx] = ch;
+ idx++;