From: jiyong.min Date: Fri, 3 Jul 2020 00:45:25 +0000 (+0900) Subject: Fix integer overflow for 'mc_result_code_e' X-Git-Tag: submit/tizen/20200702.014328^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F09%2F237709%2F2;p=platform%2Fcore%2Fapi%2Fmedia-controller.git Fix integer overflow for 'mc_result_code_e' - 'mc_result_code_e' enum is used as INT parameter in previous functions. Because 0xFFFFFFFF make integer overflow, result_code can be tainted value. So it is changed to INT_MAX value. Change-Id: Ifd8b27ceed31dd55e3e106f1d7a78587354149e5 --- diff --git a/include/media_controller_type.h b/include/media_controller_type.h index 31124e1..d31924e 100755 --- a/include/media_controller_type.h +++ b/include/media_controller_type.h @@ -327,7 +327,7 @@ typedef enum { MC_RESULT_CODE_NETWORK_FAILED = 500, /**< The network has failed. */ MC_RESULT_CODE_NO_ACCOUNT = 600, /**< The application needs to have an account to which it's logged in. */ MC_RESULT_CODE_LOGIN_FAILED, /**< The application could not log in. */ - MC_RESULT_CODE_UNKNOWN = 0xFFFFFFFF, /**< Unknown error. */ + MC_RESULT_CODE_UNKNOWN = 0x7FFFFFFF, /**< Unknown error. */ } mc_result_code_e; /**