[UTC][mediademuxer][NonACR][Fix SVACE issue]
authorGilbok Lee <gilbok.lee@samsung.com>
Fri, 30 Mar 2018 05:54:30 +0000 (14:54 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Fri, 30 Mar 2018 05:54:30 +0000 (14:54 +0900)
Change-Id: Id318f4cce6f736d3dfbba8bc17c4e9c469bf4ee8

src/utc/mediademuxer/utc-mediademuxer.c

index 1faf711..bc69818 100755 (executable)
@@ -47,6 +47,11 @@ void utc_mediademuxer_startup(void)
                if (true == GetValueForTCTSetting("DEVICE_SUITE_TARGET_30", pszValue, API_NAMESPACE)) {
                        PRINT_UTC_LOG("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE, pszValue);
                        file_path = (char *)malloc(strlen(pszValue) + strlen("sample.mp4") + 6);
+                       if (!file_path) {
+                               PRINT_UTC_LOG("[Line : %d][%s] Fail to malloc file_path\n", __LINE__, API_NAMESPACE);
+                               _is_broken = true;
+                               return;
+                       }
                        snprintf(file_path, strlen(pszValue) + strlen("sample.mp4") + 6, "%s/res/%s", pszValue, "sample.mp4");
                } else {
                        PRINT_UTC_LOG("[Line : %d][%s] GetValueForTCTSetting returned error for 'DEVICE_SUITE_TARGET_30'\\n", __LINE__, API_NAMESPACE);