From: Wonnam Jang Date: Thu, 12 Apr 2018 11:23:34 +0000 (+0900) Subject: Correct to check return of fread X-Git-Tag: accepted/tizen/unified/20180424.082628~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fstt.git;a=commitdiff_plain;h=b6c8a3bce923b98c8b980a8b320d1e9c2ac076c5 Correct to check return of fread Change-Id: I59e5b05bc4e6586b086112e919cd335a8feca2fd Signed-off-by: Wonnam Jang --- diff --git a/client/stt.c b/client/stt.c index 32b2534..8a55d34 100644 --- a/client/stt.c +++ b/client/stt.c @@ -105,7 +105,7 @@ static bool __check_privilege(const char* uid, const char * privilege) fp = fopen(label_path, "r"); if (fp != NULL) { - if (sizeof(smack_label) != fread(smack_label, 1, sizeof(smack_label), fp)) + if (0 >= fread(smack_label, 1, sizeof(smack_label), fp)) SLOG(LOG_ERROR, TAG_STTC, "[ERROR] fail to fread"); fclose(fp);