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

src/utc/mediamuxer/utc-mediamuxer.c

index 203445e..167b7c6 100755 (executable)
@@ -65,10 +65,20 @@ void utc_mediamuxer_startup(void)
 
                if(h264_path == NULL) {
                        h264_path = (char *)malloc(strlen(pszValue) + strlen(h264_file) + 6);
+                       if (!h264_path) {
+                               PRINT_UTC_LOG("[Line : %d][%s] Fail to malloc h264 path\n", __LINE__, API_NAMESPACE);
+                               _is_broken = true;
+                               return;
+                       }
                    snprintf(h264_path, strlen(pszValue) + strlen(h264_file) + 6, "%s/res/%s", pszValue, h264_file );
                }
                if(file_path == NULL){
                    file_path = (char *)malloc(strlen(pszValue)+ strlen(file) + 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(file) + 6, "%s/res/%s", pszValue, file );
                }
        } else {