From: sungwook79.park Date: Thu, 26 Apr 2018 07:12:23 +0000 (+0900) Subject: Fix issue that detected by static analysis tool X-Git-Tag: submit/tizen/20180426.083409~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F09%2F177209%2F1;p=platform%2Fcore%2Fapi%2Finputmethod.git Fix issue that detected by static analysis tool Change-Id: Ib95ea84d559e1d79e286f88ca7a875a6ccbfeee1 Signed-off-by: sungwook79.park --- diff --git a/src/privilege_checker.cpp b/src/privilege_checker.cpp index 5afdc1a..1e4c0aa 100644 --- a/src/privilege_checker.cpp +++ b/src/privilege_checker.cpp @@ -54,7 +54,7 @@ check_privilege(const char *uid, const char *privilege) fp = fopen(label_path, "r"); if (fp != NULL) { - if (fread(smack_label, 1, sizeof(smack_label), fp) <= 0) + if (fread(smack_label, 1, sizeof(smack_label) - 1, fp) <= 0) LOGW("Error : fread"); fclose(fp);