[ITC/CTC][Dexter][Non-ACR][Fixing of dexter issues for June Month] 14/209814/5
authorPriya Kohli <priya.kohli@samsung.com>
Thu, 11 Jul 2019 08:51:11 +0000 (14:21 +0530)
committerABHISHEK JAIN <j.abhishek@samsung.com>
Mon, 15 Jul 2019 09:31:24 +0000 (09:31 +0000)
Change-Id: I022fc7e12225b2af06fc13b5dbf52f8596a17017
Signed-off-by: Priya Kohli <priya.kohli@samsung.com>
79 files changed:
src/ctc/platform-permission/CTs-platform-permission-contacts-service.c
src/ctc/platform-permission/CTs-platform-permission-media-content.c
src/ctc/sensor/ve-760A.tmp
src/itc/accounts-svc/ITs-accounts-svc-common.c
src/itc/accounts-svc/ITs-accounts-svc.c
src/itc/alarm/ITs-alarm-common.c
src/itc/application/ITs-application-app-control.c
src/itc/application/ITs-application-common.c
src/itc/base-utils/ITs-base-utils-ustring.c
src/itc/bluetooth/ITs-bluetooth-adapter.c
src/itc/bundle/ITs-bundle.c
src/itc/calendar-service2/ITs-calendar-service2-common.c
src/itc/capi-maps-service/ITs-capi-maps-route-maneuver.c
src/itc/capi-maps-service/ITs-capi-maps-route.c
src/itc/capi-maps-service/ITs-capi-maps-service-common.c
src/itc/capi-maps-service/ITs-capi-maps-service-here.c
src/itc/capi-maps-service/ITs-capi-maps-view-here.c
src/itc/capi-media-tool/ITs-capi-media-tool-common.c
src/itc/capi-mediademuxer/ITs-capi-mediademuxer.c
src/itc/capi-mediamuxer/ITs-capi-mediamuxer.c
src/itc/contacts-service2/ITs-contacts-service2-common.c
src/itc/contacts-service2/ITs-contacts-service2-database.c
src/itc/dali-adaptor/application/ITs-application.cpp
src/itc/dali-core/base-handle/ITs-base-handle.cpp
src/itc/dali-core/callback/ITs-callback.cpp
src/itc/dali-core/constraint-source/ITs-constraint-source-common.h
src/itc/dali-core/constraint/ITs-constraint-common.h
src/itc/dali-core/constraints/ITs-constraints.cpp
src/itc/dali-core/custom-actor/ITs-custom-actor-impl.h
src/itc/dali-core/property-map/ITs-property-map.cpp
src/itc/dali-core/property-notification/ITs-property-notification-common.h
src/itc/dali-core/property-registration/ITs-property-registration-impl.h
src/itc/dali-core/property-value/ITs-property-value.cpp
src/itc/dali-core/signal-connector-type/ITs-signal-connector-type.cpp
src/itc/dali-core/signal/ITs-signal-common.h
src/itc/dali-core/type-info/ITs-type-info.cpp
src/itc/dali-core/type-registry/ITs-type-registry.cpp
src/itc/dali-toolkit/accessibility-manager/ITs-accessibility-manager.cpp
src/itc/dali-toolkit/keyboard-focus-manager/ITs-keyboard-focus-manager-common.cpp
src/itc/dali-toolkit/scroll-view/ITs-scroll-view-impl.h
src/itc/data-control/ITs-data-control-common.c
src/itc/data-control/ITs-data-control-provider.c
src/itc/data-control/ITs-data-control-sql.c
src/itc/email/ITs-email-common.c
src/itc/email/ITs-email.c
src/itc/image-util/ITs-image-util-common.c
src/itc/key-manager/ITs-key-manager-common.c
src/itc/media-content/ITs-media-content-audio-meta.c
src/itc/media-content/ITs-media-content-bookmark.c
src/itc/media-content/ITs-media-content-common.c
src/itc/media-content/ITs-media-content-face.c
src/itc/media-content/ITs-media-content-image-meta.c
src/itc/media-content/ITs-media-content-info.c
src/itc/media-content/ITs-media-content-playlist.c
src/itc/media-content/ITs-media-content-tag.c
src/itc/media-content/ITs-media-content-video-meta.c
src/itc/media-vision/ITs-media-vision-common.c
src/itc/media-vision/ITs-media-vision-face.c
src/itc/mediastreamrecorder/ITs-mediastreamrecorder-common.c
src/itc/messages/ITs-messages-common.c
src/itc/metadata-editor/ITs-metadata-editor-common.c
src/itc/metadata-extractor/ITs-metadata-extractor-common.c
src/itc/motion/ITs-motion-common.c
src/itc/nfc/ITs-nfc-ndef.c
src/itc/notification/ITs-notification-common.c
src/itc/player/ITs-player-common.c
src/itc/recorder/ITs-recorder-common.c
src/itc/runtime-info/ITs-runtime-info-common.c
src/itc/stt/ITs-stt-common.c
src/itc/stt/ITs-stt-common.h
src/itc/stt/ITs-stt.c
src/itc/thumbnail-util/ITs-thumbnail-util-common.c
src/itc/tts/tct-tts-native.c
src/itc/watchface/ITs-watchface-complication-provider.c
src/itc/wav-player/ITs-wav-player-common.c
src/itc/webkit2/ITs-webkit2-common.c
src/itc/webkit2/ITs-webkit2-intercept-request.c
src/itc/widget_service/ITs-widget_service.c
src/itc/wifi-direct/ITs-wifi-direct.c

index 451ceedb8a1b57f88733610f62f80896e7737c67..63614cdab4537628bb8c1f7df175ef1ee131b537 100755 (executable)
@@ -362,7 +362,7 @@ void CTs_platform_permission_ContactsService_cleanup(void)
     FPRINTF("[Line : %d][%s] TEST SUIT clean-up: CTs_platform_permission_ContactsService_p\\n", __LINE__, API_NAMESPACE);
 #endif
 
-       if( g_bIsConnected || (!g_bIsConnected && ContactsServiceConnect()) )
+       if( g_bIsConnected || ContactsServiceConnect() )
        {
                contacts_record_destroy(g_hRecordFirst, true);
                contacts_record_destroy(g_hFirstProfileRecord, true);
index 3fa949e155a63967ea962f05499b4c64cd04bea4..bbfb046c9859e05c4e7455a2588a4cf60a11302e 100755 (executable)
@@ -486,7 +486,7 @@ void AppendPaths(char *FirstPath, char *SecondPath, char *FinalPath)
 {
        memset(FinalPath, 0, PATHLEN);
        strncpy(FinalPath, FirstPath, strlen(FirstPath)+1);
-       strncat(FinalPath, "/", 1);
+       strncat(FinalPath, "/", strlen("/")+1);
        strncat(FinalPath, SecondPath, strlen(SecondPath)+1);
 
        FPRINTF("[Line : %d][%s] Appended Path is : %s\\n", __LINE__, API_NAMESPACE, FinalPath);
index 827481d0b5db31da3b8d682d3e889ddafc7493f7..046c1abd996541a85e4ca38d6c8c945950929bae 100755 (executable)
@@ -31,15 +31,15 @@ void SystemInformationErrorInfo(char *pszApi,int nError)
        pszErrInfo      = (char*)calloc(MEMLOG_SIZE, MEMLOG_SIZE * sizeof(char));
        switch(nError)
        {
-       case SYSTEM_INFO_ERROR_PERMISSION_DENIED:       strcpy(pszErrInfo,"SYSTEM_INFO_ERROR_PERMISSION_DENIED");       break;
+       case SYSTEM_INFO_ERROR_PERMISSION_DENIED:       strncpy(pszErrInfo,"SYSTEM_INFO_ERROR_PERMISSION_DENIED", strlen("SYSTEM_INFO_ERROR_PERMISSION_DENIED")+1);     break;
 
-       case SYSTEM_INFO_ERROR_INVALID_PARAMETER:       strcpy(pszErrInfo,"SYSTEM_INFO_ERROR_INVALID_PARAMETER");       break;
+       case SYSTEM_INFO_ERROR_INVALID_PARAMETER:       strncpy(pszErrInfo,"SYSTEM_INFO_ERROR_INVALID_PARAMETER", strlen("SYSTEM_INFO_ERROR_INVALID_PARAMETER")+1);     break;
 
-       case SYSTEM_INFO_ERROR_OUT_OF_MEMORY:           strcpy(pszErrInfo,"SYSTEM_INFO_ERROR_OUT_OF_MEMORY");           break;
+       case SYSTEM_INFO_ERROR_OUT_OF_MEMORY:           strncpy(pszErrInfo,"SYSTEM_INFO_ERROR_OUT_OF_MEMORY", strlen("SYSTEM_INFO_ERROR_OUT_OF_MEMORY")+1);             break;
 
-       case SYSTEM_INFO_ERROR_IO_ERROR:                        strcpy(pszErrInfo,"SYSTEM_INFO_ERROR_IO_ERROR");                        break;
+       case SYSTEM_INFO_ERROR_IO_ERROR:                        strncpy(pszErrInfo,"SYSTEM_INFO_ERROR_IO_ERROR", strlen("SYSTEM_INFO_ERROR_IO_ERROR")+1);                       break;
 
-       default:                                                                        strcpy(pszErrInfo,"Unknown_Error");
+       default:                                                                        strncpy(pszErrInfo,"Unknown_Error", strlen("Unknown_Error")+1);
        }
 
        fprintf(fpLog,"\\n[%s] %s  failed , error returned = %s.",API_NAMESPACE, pszApi,pszErrInfo);
@@ -84,21 +84,21 @@ void SensorApiErrorInfo(char *pszApi,int nRet)
        pszErrMSG = (char*)calloc(MAX_BLOCK_SIZE, MEMLOG_SIZE * sizeof(char));
        switch(nRet) 
        {               
-       case SENSOR_ERROR_IO_ERROR  :                                   strcpy(pszErrMSG,"SENSOR_ERROR_IO_ERROR");                              break;
+       case SENSOR_ERROR_IO_ERROR  :                                   strncpy(pszErrMSG,"SENSOR_ERROR_IO_ERROR", strlen("SENSOR_ERROR_IO_ERROR")+1);                          break;
 
-       case SENSOR_ERROR_INVALID_PARAMETER   :                 strcpy(pszErrMSG,"SENSOR_ERROR_INVALID_PARAMETER");             break;
+       case SENSOR_ERROR_INVALID_PARAMETER   :                 strncpy(pszErrMSG,"SENSOR_ERROR_INVALID_PARAMETER", strlen("SENSOR_ERROR_INVALID_PARAMETER")+1);                break;
 
-       case SENSOR_ERROR_OUT_OF_MEMORY :                               strcpy(pszErrMSG,"SENSOR_ERROR_OUT_OF_MEMORY" );                break;
+       case SENSOR_ERROR_OUT_OF_MEMORY :                               strncpy(pszErrMSG,"SENSOR_ERROR_OUT_OF_MEMORY", strlen("SENSOR_ERROR_OUT_OF_MEMORY")+1);                break;
 
-       case SENSOR_ERROR_NOT_NEED_CALIBRATION :                strcpy(pszErrMSG,"SENSOR_ERROR_NOT_NEED_CALIBRATION "); break;
+       case SENSOR_ERROR_NOT_NEED_CALIBRATION :                strncpy(pszErrMSG,"SENSOR_ERROR_NOT_NEED_CALIBRATION", strlen("SENSOR_ERROR_NOT_NEED_CALIBRATION")+1);  break;
 
-       case SENSOR_ERROR_NOT_SUPPORTED:                                strcpy(pszErrMSG,"SENSOR_ERROR_NOT_SUPPORTED");                 break;
+       case SENSOR_ERROR_NOT_SUPPORTED:                                strncpy(pszErrMSG,"SENSOR_ERROR_NOT_SUPPORTED", strlen("SENSOR_ERROR_NOT_SUPPORTED")+1);                        break;
 
-       case SENSOR_ERROR_OPERATION_FAILED :                    strcpy(pszErrMSG,"SENSOR_ERROR_OPERATION_FAILED");              break;
+       case SENSOR_ERROR_OPERATION_FAILED :                    strncpy(pszErrMSG,"SENSOR_ERROR_OPERATION_FAILED", strlen("SENSOR_ERROR_OPERATION_FAILED")+1);          break;
 
-       case SENSOR_ERROR_PERMISSION_DENIED  :                  strcpy(pszErrMSG,"SENSOR_ERROR_PERMISSION_DENIED");             break;
+       case SENSOR_ERROR_PERMISSION_DENIED  :                  strncpy(pszErrMSG,"SENSOR_ERROR_PERMISSION_DENIED", strlen("SENSOR_ERROR_PERMISSION_DENIED")+1);                break;
 
-       default:                                                                                strcpy(pszErrMSG,"Returned error is UNKNOWN" );
+       default:                                                                                strncpy(pszErrMSG,"Returned error is UNKNOWN", strlen("Returned error is UNKNOWN")+1);
 
        }
        fprintf (fpLog,"\\n[%s] %s is failed, error returned = %s (%d)", API_NAMESPACE, pszApi, pszErrMSG, nRet);       
index aa3f297a63ae5b7101f34d65b278fa57d509d825..6203d76925855e42b3f636ee623229cfb69cb1bf 100755 (executable)
@@ -81,7 +81,7 @@ bool AccManagerGetDataPath(char* pAppDataPath)
                return false;
        }
 
-       strcpy(pAppDataPath, pPath);
+       strncpy(pAppDataPath, pPath, strlen(pPath)+1);
 
        FPRINTF( "[Line: %d] [%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
 
@@ -111,8 +111,8 @@ bool AccManagerAppendToAppDataPath(char* pInputPath, char* pFinalPath)
        }
 
        memset(pFinalPath, 0, PATH_LEN);
-       strcpy(pFinalPath, pAppDataPath);
-       strcat(pFinalPath, pInputPath);
+       strncpy(pFinalPath, pAppDataPath, strlen(pAppDataPath)+1);
+       strncat(pFinalPath, pInputPath, strlen(pInputPath)+1);
 
        FPRINTF( "[Line: %d] [%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
 
index c6fb43ee601d8cf9627ea805ffd142a31375c2d5..dc5b26491cb6d3136b725a0f08b4228fb6540d52 100755 (executable)
@@ -99,7 +99,7 @@ void ITs_accounts_svc_startup(void)
        }
        //Initialize APPID value from configuration file
        memset(g_pstrAppId, 0, sizeof(g_pstrAppId));
-       strcpy(g_pstrAppId, APPID);
+       strncpy(g_pstrAppId, APPID, strlen(APPID)+1);
        g_bAccountCreation = true;
        return;
 }
@@ -356,15 +356,15 @@ static bool AccountLabelCB(char* app_id, char* label, char* locale, void *user_d
 #endif
        if ( app_id != NULL )
        {
-               strcpy(g_szAppID, app_id);
+               strncpy(g_szAppID, app_id, strlen(app_id)+1);
        }
        if ( locale != NULL )
        {
-               strcpy(g_szLocale, locale);
+               strncpy(g_szLocale, locale, strlen(locale)+1);
        }
        if ( label != NULL )
        {
-               strcpy(g_szLabel, label);
+               strncpy(g_szLabel, label, strlen(label)+1);
        }
 
        if ( mainloop )
@@ -392,11 +392,11 @@ static bool ServiceProviderFeatureCB(char* app_id, char* key, void* user_data)
        g_nPackageIdCB = 1;
        if ( app_id != NULL )
        {
-               strcpy(g_szAppID, app_id);
+               strncpy(g_szAppID, app_id, strlen(app_id)+1);
        }
        if ( key != NULL )
        {
-               strcpy(g_szProviderFeatureArr[g_nProviderCount++], key);
+               strncpy(g_szProviderFeatureArr[g_nProviderCount++], key, strlen(key)+1);
        }
 
        if(user_data != NULL)
index a0adca44106dfffe311a5872bdec9f043891a18f..a6cbca712f46564cb07c04ab77d5b6cd7904efb6 100755 (executable)
@@ -44,7 +44,7 @@ bool ApplicationGetDataPath(char* pAppDataPath)
                return false;
        }
 
-       strcpy(pAppDataPath, pPath);
+       strncpy(pAppDataPath, pPath, strlen(pPath)+1);
 
        FPRINTF("[Line : %d][%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
 
@@ -72,8 +72,8 @@ bool ApplicationAppendToAppDataPath(char* pInputPath, char* pFinalPath)
        }
 
        memset(pFinalPath, 0, PATH_LEN);
-       strcpy(pFinalPath, pAppDataPath);
-       strcat(pFinalPath, pInputPath);
+       strncpy(pFinalPath, pAppDataPath, strlen(pAppDataPath)+1);
+       strncat(pFinalPath, pInputPath, strlen(pInputPath)+1);
 
        FPRINTF("[Line : %d][%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
 
index acd4ed5b88ee38b946d97ecb95673d65d9949e8e..65137f54bb5786bf17b855e44ed3b20eee803bd7 100755 (executable)
@@ -790,6 +790,7 @@ int ITc_application_app_control_remove_extra_data_p(void)
        if ( pszGetVal != NULL )
        {
                FPRINTF("[Line : %d][%s] app_control_get_extra_data return extra data value after app_control_remove_extra_data call, value returned = %s\\n", __LINE__, API_NAMESPACE, pszGetVal);
+               FREE_MEMORY(pszGetVal);
                app_control_destroy(hAppControl);
                return 1;
        }
index 0f4543c945fa0d0cbb1d007a1051cbe2a6bd925e..46c100faf0984cdd502e2ac96e108be63783ef49 100755 (executable)
@@ -44,7 +44,7 @@ bool ApplicationGetDataPath(char* pAppDataPath)
                return false;
        }
 
-       strcpy(pAppDataPath, pPath);
+       strncpy(pAppDataPath, pPath, strlen(pPath)+1);
 
        FPRINTF("[Line : %d][%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
 
@@ -72,8 +72,8 @@ bool ApplicationAppendToAppDataPath(char* pInputPath, char* pFinalPath)
        }
 
        memset(pFinalPath, 0, PATH_LEN);
-       strcpy(pFinalPath, pAppDataPath);
-       strcat(pFinalPath, pInputPath);
+       strncpy(pFinalPath, pAppDataPath, strlen(pAppDataPath)+1);
+       strncat(pFinalPath, pInputPath, strlen(pInputPath)+1);
 
        FPRINTF("[Line : %d][%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
 
index e0951dcf5933df4163fd5e13d67118d2e8f3b633..320a8d4213f25883196367accf69f859d02fa62f 100755 (executable)
@@ -192,7 +192,7 @@ int ITc_i18n_ustring_from_UTF8_to_UTF8_p(void)
 
        memset(szSource, 0, sizeof(szSource));
        memset(szDest, 0, sizeof(szDest));
-       sprintf(szSource, "Tizen");
+       snprintf(szSource, sizeof(szSource)-1, "Tizen");
        int nSourceLength = strlen((const char*)szSource);
        i18n_uchar ucharSource[I18N_UCHAR_CAPACITY] = {0,};
        int nUcharSourceLength = 0;
@@ -248,7 +248,7 @@ int ITc_i18n_ustring_copy_au_p(void)
 
        memset(szSource, 0, sizeof(szSource));
        memset(szDest, 0, sizeof(szDest));
-       sprintf(szSource, "Tizen");
+       snprintf(szSource, sizeof(szSource)-1, "Tizen");
        i18n_uchar ucharSource[I18N_UCHAR_CAPACITY] = {0,};
        i18n_uchar *pRet = i18n_ustring_copy_ua_n(ucharSource, szSource, strlen(szSource));
        if ( i18n_ustring_get_length(ucharSource) <= 0 || pRet == NULL )
@@ -298,7 +298,7 @@ int ITc_i18n_ustring_copy_au_n_p(void)
        memset(szSource, 0, sizeof(szSource));
        memset(szDest, 0, sizeof(szDest));
        i18n_uchar ucharSource[I18N_UCHAR_CAPACITY] = {0,};
-       sprintf(szSource, "Tizen");
+       snprintf(szSource, sizeof(szSource)-1, "Tizen");
        i18n_uchar *pRet = i18n_ustring_copy_ua_n(ucharSource, szSource, strlen(szSource));
        nUcharSourceLength = i18n_ustring_get_length(ucharSource);
        if ( nUcharSourceLength <= 0 || pRet == NULL )
@@ -343,7 +343,7 @@ int ITc_i18n_ustring_copy_ua_n_p(void)
 
        char szSource[I18N_UCHAR_CAPACITY] = {0};
        memset(szSource, 0, sizeof(szSource));
-       sprintf(szSource, "Tizen");
+       snprintf(szSource, sizeof(szSource)-1, "Tizen");
        i18n_uchar ucharSource[I18N_UCHAR_CAPACITY] = {0,};
        i18n_uchar ucharDest[I18N_UCHAR_CAPACITY] = {0,};
        i18n_ustring_copy_ua_n(ucharSource, szSource, strlen(szSource));
@@ -394,7 +394,7 @@ int ITc_i18n_ustring_copy_ua_p(void)
 
        char szSource[I18N_UCHAR_CAPACITY] = {0};
        memset(szSource, 0, sizeof(szSource));
-       sprintf(szSource, "Tizen");
+       snprintf(szSource, sizeof(szSource)-1, "Tizen");
        i18n_uchar ucharSource[I18N_UCHAR_CAPACITY] = {0,};
        i18n_uchar ucharDest[I18N_UCHAR_CAPACITY] = {0,};
        i18n_ustring_copy_ua(ucharSource, szSource);
index 0dc25cbaac274785d8a7766727e70d199bb5f12b..9698a61be0f60818eb093f76f0529159d4ef8111 100755 (executable)
@@ -314,7 +314,7 @@ int ITc_bluetooth_adapter_bt_adapter_set_get_name_p(void)
        {
                if ( strcmp(pszSetLocalName, pszTempGetLocalName) == 0 )
                {
-                       sprintf(pszSetLocalName, "%s00", ADAPTER_NAME);
+                       snprintf(pszSetLocalName, ADAPTER_NAME_LENGTH, "%s00", ADAPTER_NAME);
                }
        }
        
@@ -390,7 +390,7 @@ int ITc_bluetooth_adapter_bt_adapter_set_unset_name_changed_cb_p(void)
        {
                if ( strcmp(pszSetLocalName, pszTempGetLocalName) == 0 )
                {
-                       sprintf(pszSetLocalName, "%s00", ADAPTER_NAME);
+                       snprintf(pszSetLocalName, ADAPTER_NAME_LENGTH, "%s00", ADAPTER_NAME);
                }
        }
 
index 7aef9ef023f329d72a62e041a2f7c0df6497b680..d9e441a7f1db3ef4e01e1ba23b2029bb6b1e8a1f 100755 (executable)
@@ -279,8 +279,8 @@ int ITc_bundle_create_add_str_free_p(void)
                return 1;
        }
 
-       sprintf(szKey, "KEY%d", 1);
-       sprintf(szValue, "VALUE%d", 1);
+       snprintf(szKey, sizeof(szKey)-1, "KEY%d", 1);
+       snprintf(szValue, sizeof(szValue)-1, "VALUE%d", 1);
 
        int nRetVal = bundle_add_str(pBundle, szKey, szValue);
        PRINT_RESULT_CLEANUP(BUNDLE_ERROR_NONE, nRetVal, "bundle_add_str", BundleGetError(nRetVal), bundle_free(pBundle));
@@ -313,8 +313,8 @@ int ITc_bundle_add_get_byte_p(void)
 
        char szKeyByte[20] = {0};
        char szValueByte[20] = {0};
-       sprintf(szKeyByte, "KEY%dB", 1);
-       sprintf(szValueByte, "VALUE%dB", 1);
+       snprintf(szKeyByte, sizeof(szKeyByte)-1, "KEY%dB", 1);
+       snprintf(szValueByte, sizeof(szValueByte)-1, "VALUE%dB", 1);
 
        int nRetVal = bundle_add_byte(g_bundle, szKeyByte, szValueByte, 20);
        PRINT_RESULT(BUNDLE_ERROR_NONE, nRetVal, "bundle_add_byte", BundleGetError(nRetVal));
@@ -407,16 +407,16 @@ int ITc_bundle_get_type_del_p(void)
        char szKey[20] = {0};
        char szValue[20] = {0};
 
-       sprintf(szKey, "KEY%d", 1);
-       sprintf(szValue, "VALUE%d", 1);
+       snprintf(szKey, sizeof(szKey)-1, "KEY%d", 1);
+       snprintf(szValue, sizeof(szValue)-1, "VALUE%d", 1);
 
        int nRetVal = bundle_add_str(g_bundle, szKey, szValue);
        PRINT_RESULT(BUNDLE_ERROR_NONE, nRetVal, "bundle_add_str", BundleGetError(nRetVal));            
 
        char szKeyByte[20] = {0};
        char szValueByte[20] = {0};
-       sprintf(szKeyByte, "KEY%dB", 1);
-       sprintf(szValueByte, "VALUE%dB", 1);
+       snprintf(szKeyByte, sizeof(szKeyByte)-1, "KEY%dB", 1);
+       snprintf(szValueByte, sizeof(szValueByte)-1, "VALUE%dB", 1);
 
        nRetVal = bundle_add_byte(g_bundle, szKeyByte, szValueByte, 20);
        PRINT_RESULT(BUNDLE_ERROR_NONE, nRetVal, "bundle_add_byte", BundleGetError(nRetVal));           
@@ -467,8 +467,8 @@ int ITc_bundle_key_val_target_apis_p(void)
        char szKey[20] = {0};
        char szValue[20] = {0};
        g_BundlestKeyVal = NULL;
-       sprintf(szKey, "KEY%d", 1);
-       sprintf(szValue, "VALUE%d", 1);
+       snprintf(szKey, sizeof(szKey)-1, "KEY%d", 1);
+       snprintf(szValue, sizeof(szValue)-1, "VALUE%d", 1);
 
        int nRetVal = bundle_add_str(g_bundle, szKey, szValue);
        PRINT_RESULT(BUNDLE_ERROR_NONE, nRetVal, "bundle_add_str", BundleGetError(nRetVal));
@@ -613,8 +613,8 @@ int ITc_bundle_get_count_p(void)
                bundle_del(g_bundle,(char *)KEY1));                     
        nCounter++;
 
-       sprintf(szKey, "KEY%d", 1);
-       sprintf(szValue, "VALUE%d", 1);
+       snprintf(szKey, sizeof(szKey)-1, "KEY%d", 1);
+       snprintf(szValue, sizeof(szValue)-1, "VALUE%d", 1);
 
        nRetVal = bundle_add_str(g_bundle,szKey, szValue); 
        PRINT_RESULT_CLEANUP(BUNDLE_ERROR_NONE, nRetVal, "bundle_add_str", BundleGetError(nRetVal) , 
index 23cd3de328c1f3285a039771d1b91e87aeaf8253..07a787f58ee4aa3505035e95b507744ff3d3eead 100755 (executable)
@@ -198,21 +198,21 @@ int CreateQueryWithFilter(calendar_query_h *query, calendar_filter_h *filter)
 */
 void GetViewURI(char szArr[MAX_ROW][MAX_COL])
 {
-       strcpy(szArr[0], _calendar_book._uri);
-       strcpy(szArr[1], _calendar_event._uri);
-       strcpy(szArr[2], _calendar_todo._uri);
-       strcpy(szArr[3], _calendar_timezone._uri);
-       strcpy(szArr[4], _calendar_attendee._uri);
-       strcpy(szArr[5], _calendar_alarm._uri);
-       strcpy(szArr[6], _calendar_extended_property._uri);
-       strcpy(szArr[7], _calendar_updated_info._uri);
-       strcpy(szArr[8], _calendar_event_calendar_book._uri);
-       strcpy(szArr[9], _calendar_todo_calendar_book._uri);
-       strcpy(szArr[10], _calendar_event_calendar_book_attendee._uri);
-       strcpy(szArr[11], _calendar_instance_utime_calendar_book._uri);
-       strcpy(szArr[12], _calendar_instance_localtime_calendar_book._uri);
-       strcpy(szArr[13], _calendar_instance_utime_calendar_book_extended._uri);
-       strcpy(szArr[14], _calendar_instance_localtime_calendar_book_extended._uri);
+       strncpy(szArr[0], _calendar_book._uri, MAX_COL-1);
+       strncpy(szArr[1], _calendar_event._uri, MAX_COL-1);
+       strncpy(szArr[2], _calendar_todo._uri, MAX_COL-1);
+       strncpy(szArr[3], _calendar_timezone._uri, MAX_COL-1);
+       strncpy(szArr[4], _calendar_attendee._uri, MAX_COL-1);
+       strncpy(szArr[5], _calendar_alarm._uri, MAX_COL-1);
+       strncpy(szArr[6], _calendar_extended_property._uri, MAX_COL-1);
+       strncpy(szArr[7], _calendar_updated_info._uri, MAX_COL-1);
+       strncpy(szArr[8], _calendar_event_calendar_book._uri, MAX_COL-1);
+       strncpy(szArr[9], _calendar_todo_calendar_book._uri, MAX_COL-1);
+       strncpy(szArr[10], _calendar_event_calendar_book_attendee._uri, MAX_COL-1);
+       strncpy(szArr[11], _calendar_instance_utime_calendar_book._uri, MAX_COL-1);
+       strncpy(szArr[12], _calendar_instance_localtime_calendar_book._uri, MAX_COL-1);
+       strncpy(szArr[13], _calendar_instance_utime_calendar_book_extended._uri, MAX_COL-1);
+       strncpy(szArr[14], _calendar_instance_localtime_calendar_book_extended._uri, MAX_COL-1);
 }
 
 /**
@@ -243,17 +243,17 @@ char* CalendarFilterOperator(int nRet)
 */
 void GetViewURIforDB(char szArr[MAX_ROW][MAX_COL])
 {
-       strcpy(szArr[0], _calendar_book._uri);
-       strcpy(szArr[1], _calendar_event._uri);
-       strcpy(szArr[2], _calendar_todo._uri);
-       strcpy(szArr[3], _calendar_timezone._uri);
-       strcpy(szArr[4], _calendar_attendee._uri);
-       strcpy(szArr[5], _calendar_alarm._uri);
-       strcpy(szArr[6], _calendar_extended_property._uri);
-       strcpy(szArr[7], _calendar_instance_utime_calendar_book._uri);
-       strcpy(szArr[8], _calendar_instance_localtime_calendar_book._uri);
-       strcpy(szArr[9], _calendar_instance_utime_calendar_book_extended._uri);
-       strcpy(szArr[10], _calendar_instance_localtime_calendar_book_extended._uri);
+       strncpy(szArr[0], _calendar_book._uri, MAX_COL-1);
+       strncpy(szArr[1], _calendar_event._uri, MAX_COL-1);
+       strncpy(szArr[2], _calendar_todo._uri, MAX_COL-1);
+       strncpy(szArr[3], _calendar_timezone._uri, MAX_COL-1);
+       strncpy(szArr[4], _calendar_attendee._uri, MAX_COL-1);
+       strncpy(szArr[5], _calendar_alarm._uri, MAX_COL-1);
+       strncpy(szArr[6], _calendar_extended_property._uri, MAX_COL-1);
+       strncpy(szArr[7], _calendar_instance_utime_calendar_book._uri, MAX_COL-1);
+       strncpy(szArr[8], _calendar_instance_localtime_calendar_book._uri, MAX_COL-1);
+       strncpy(szArr[9], _calendar_instance_utime_calendar_book_extended._uri, MAX_COL-1);
+       strncpy(szArr[10], _calendar_instance_localtime_calendar_book_extended._uri, MAX_COL-1);
 }
 
 
@@ -265,8 +265,8 @@ void GetViewURIforDB(char szArr[MAX_ROW][MAX_COL])
 */
 void GetViewURIforDBByVersion(char szArr[MAX_ROW][MAX_COL])
 {
-       strcpy(szArr[0], _calendar_event._uri);
-       strcpy(szArr[1], _calendar_todo._uri);
+       strncpy(szArr[0], _calendar_event._uri, MAX_COL-1);
+       strncpy(szArr[1], _calendar_todo._uri, MAX_COL-1);
 }
 
 /**
index 0350ec637e0aec2219684420f885e4c785ae655a..6baa4c1c5dd562229881fdbdf9e041b529a7ed32 100755 (executable)
@@ -69,7 +69,7 @@ static bool MapsServiceRouteFoundCb(maps_error_e error, int request_id, int inde
 static bool MapServiceProviderForeachCb(char* maps_provider, void* user_data)
 {
        memset( g_szMapsProvider, '\0', sizeof(char)*BUFFER);
-       strcpy(g_szMapsProvider, "HERE");
+       strncpy(g_szMapsProvider, "HERE", sizeof(g_szMapsProvider)-1);
        FPRINTF("[Line : %d][%s] Provider list from maps_service_foreach_provider is = %s\\n", __LINE__, API_NAMESPACE, g_szMapsProvider);      
        g_nCheckCb = true;
        return false;
index e9463ac0c4e32a3532659d268ede3ce0ba9d7298..e02db19329c08a3d111e9b6e1e18e0a2a7a31a34 100755 (executable)
@@ -71,7 +71,7 @@ static bool MapsServiceRouteFoundCb(maps_error_e error, int request_id, int inde
 static bool MapServiceProviderForeachCb(char* maps_provider, void* user_data)
 {
        memset( g_szMapsProvider, '\0', sizeof(char)*BUFFER);
-       strcpy(g_szMapsProvider, "HERE");
+       strncpy(g_szMapsProvider, "HERE", sizeof(g_szMapsProvider)-1);
        FPRINTF("[Line : %d][%s] Provider list from maps_service_foreach_provider is = %s\\n", __LINE__, API_NAMESPACE, g_szMapsProvider);      
        g_nCheckCb = true;
        return false;
index 2ba458e5ae8d0075231d090f69d7d0308c9a8d8c..0ee72a74b689d0f4064651a4c8720f47e7ac8077 100755 (executable)
@@ -92,7 +92,7 @@ bool MapsServiceProviderForeachHERECb(char* maps_provider, void* user_data)
        memset( g_szMapsProvider, '\0', sizeof(char)*BUFFER);
        if(maps_provider != NULL)
        {
-               strcpy(g_szMapsProvider, "HERE");
+               strncpy(g_szMapsProvider, "HERE", sizeof(g_szMapsProvider)-1);
                FPRINTF("[Line : %d][%s] Provider list from maps_service_foreach_provider is = %s\\n", __LINE__, API_NAMESPACE, g_szMapsProvider);      
        }
        else
index 6a1a9b3adbf6436a6ee6012e6b41e40fdf1092b8..d1c6241026b3f9955d3de9ec2265c30be9a6b681 100755 (executable)
@@ -46,7 +46,7 @@ static bool MapServiceMultiRevGeocodeCb(maps_error_e result, int request_id, int
 static bool MapsServiceProviderForeachCb(char* maps_provider, void* user_data)
 {
        memset( g_szMapsProvider, '\0', sizeof(char)*BUFFER);
-       strcpy(g_szMapsProvider, "HERE");
+       strncpy(g_szMapsProvider, "HERE", sizeof(g_szMapsProvider)-1);
        FPRINTF("[Line : %d][%s] Provider list from maps_service_foreach_provider is = %s\\n", __LINE__, API_NAMESPACE, g_szMapsProvider);      
        g_nCheckCb = true;
        return false;
@@ -225,7 +225,7 @@ void ITs_maps_service_startup(void)
        }
        else {
                memset( g_szMapsProvider, '\0', sizeof(char)*BUFFER);
-               strcpy(g_szMapsProvider, "HERE");
+               strncpy(g_szMapsProvider, "HERE", sizeof(g_szMapsProvider)-1);
                FPRINTF("[Line : %d][%s] Provider list from maps_service_foreach_provider is = %s\\n", __LINE__, API_NAMESPACE, g_szMapsProvider);
        }
 
index 6c4b5d421f1998ef558d76968f28a7cc39fe9acb..3149cdee150303c9056b4bcdc0ec221f8753b1da 100755 (executable)
@@ -82,7 +82,7 @@ void ITs_maps_view_startup(void)
        }
        
        memset(g_szMapsProvider, '\0', sizeof(char)*BUFFER);
-       strcpy(g_szMapsProvider, "HERE");
+       strncpy(g_szMapsProvider, "HERE", sizeof(g_szMapsProvider)-1);
        FPRINTF("[Line : %d][%s] Provider list from maps_service_foreach_provider is = %s\\n", __LINE__, API_NAMESPACE, g_szMapsProvider);
        int nRet = maps_service_create(g_szMapsProvider, &g_HandleMapService);
        if ( false == bMapsFeatureSupported)
index 35fae5a1ff21cedbd6ffa3f679b474c102307540..4f7f38561f0c417933e1812ef5b3643df5a02739 100755 (executable)
@@ -43,7 +43,7 @@ bool MediaToolGetDataPath(char* pAppDataPath)
                return false;
        }
 
-       strcpy(pAppDataPath, pPath);
+       strncpy(pAppDataPath, pPath, strlen(pAppDataPath)+1);
 
        FPRINTF("[Line: %d][%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
 
@@ -71,8 +71,8 @@ bool MediaToolAppendToAppDataPath(char* pInputPath, char* pFinalPath)
        }
 
        memset(pFinalPath, 0, PATH_LEN);
-       strcpy(pFinalPath, pAppDataPath);
-       strcat(pFinalPath, pInputPath);
+       strncpy(pFinalPath, pAppDataPath, strlen(pFinalPath)+1);
+       strncat(pFinalPath, pInputPath, strlen(pInputPath)+1);
 
        FPRINTF("[Line: %d][%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
        return true;
index bd01fa4024509bb742a7c2c2f472b67272b4476c..6b1dfc3cf077d2c34809de04db9cbbc9e440399a 100755 (executable)
@@ -97,7 +97,7 @@ void ITs_mediademuxer_startup(void)
                {
                        FPRINTF("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
                        g_file_path=(char*)malloc(strlen(pszValue)+ strlen( "sample.mp4" ) + 6);
-                       sprintf(g_file_path, "%s/res/%s", pszValue, "sample.mp4" );
+                       snprintf(g_file_path, strlen(pszValue) + strlen("/res/sample.mp4") + 1, "%s/res/sample.mp4", pszValue);
                }
                else
                {
index 7ad7f5f878e66df0cfc8c2d143f994843225618c..5830f42df3b295a2dca56df510df4b0b6dc6afbf 100755 (executable)
@@ -104,11 +104,11 @@ void ITs_mediamuxer_startup(void)
                FPRINTF("[Line : %d][%s] 'DEVICE_SUITE_TARGET_30' Values Received = %s\\n", __LINE__, API_NAMESPACE,  pszValue);
                if(g_h264_path == NULL){
                        g_h264_path=(char*)malloc(strlen(pszValue)+ strlen( g_h264_file ) + 6);
-                       sprintf(g_h264_path, "%s/res/%s", pszValue, g_h264_file );
+                       snprintf(g_h264_path, strlen("/res/") + strlen(pszValue) + strlen(g_h264_file) + 1, "%s/res/%s", pszValue, g_h264_file );
                }
                if(g_file_path == NULL){
                        g_file_path=(char*)malloc(strlen(pszValue)+ strlen( g_file ) + 6);
-                       sprintf(g_file_path, "%s/res/%s", pszValue, g_file );
+                       snprintf(g_file_path, strlen("/res/") + strlen(pszValue) + strlen(g_file) + 1, "%s/res/%s", pszValue, g_file );
                }
        }
        else
index 319bace77911deefa2f29595da80f5470a5ca063..0847b9b511b4635d12c27001ff60116ea173046d 100755 (executable)
@@ -46,7 +46,7 @@ bool ContactsServiceGetDataPath(char* pAppDataPath)
                return false;
        }
 
-       strcpy(pAppDataPath, pPath);
+       strncpy(pAppDataPath, pPath, PATH_LEN-1);
 
        FPRINTF("[Line : %d][%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
 
@@ -74,8 +74,8 @@ bool ContactsServiceAppendToAppDataPath(char* pInputPath, char* pFinalPath)
        }
 
        memset(pFinalPath, 0, PATH_LEN);
-       strcpy(pFinalPath, pAppDataPath);
-       strcat(pFinalPath, pInputPath);
+       strncpy(pFinalPath, pAppDataPath, PATH_LEN-1);
+       strncat(pFinalPath, pInputPath, strlen(pInputPath)+1);
 
        FPRINTF("[Line : %d][%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
 
index aba3f0363a55d68d9d6f72c3685a467c75aa8314..820f508bb73432eef7e0892f054111f2870d9c55 100755 (executable)
@@ -137,7 +137,7 @@ void ITs_contacts_service2_database_cleanup(void)
 #if DEBUG
        FPRINTF("[Line : %d][%s] TEST SUIT clean-up: ITs_Contacts_Service2_p\\n", __LINE__, API_NAMESPACE);
 #endif
-       if( g_bIsConnected || (!g_bIsConnected && ContactsServiceConnect()) )
+       if( g_bIsConnected || ContactsServiceConnect() )
        {
                contacts_record_destroy(g_hRecordFirst, true);
                contacts_record_destroy(g_hFirstProfileRecord, true);
index 3a0cbace8196870a9e39a6da1c865f6528c96a45..5e86c5b64b0902c371c447e75ea402240f883f0f 100755 (executable)
@@ -243,7 +243,7 @@ void ApplicationGetRegion(Application& mApplication)
        system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, &compareString);
        std::string result = mApplication.GetRegion();
        DALI_CHECK_FAIL( result.compare( std::string(compareString) ), "Application::GetRegion is failed." );
-
+       FREE_MEMORY(compareString);
        DaliLog::PrintPass();
 }
 
@@ -254,7 +254,7 @@ void ApplicationGetLanguage(Application& mApplication)
        system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &compareString);
        std::string result = mApplication.GetLanguage();
        DALI_CHECK_FAIL( result.compare( std::string(compareString) ), "Application::GetLanguage is failed." );
-
+       FREE_MEMORY(compareString);
        DaliLog::PrintPass();
 }
 
index d1d2944236bf6481e9b3af1fc677beaf918064a5..3e6ea187097f10f34588d22009c2727dfd7fa0de 100755 (executable)
@@ -40,7 +40,7 @@ struct TestCallback
 // Functor to test whether an animation finish signal is emitted
 struct AnimationFinishCheck
 {
-       AnimationFinishCheck(bool& signalReceived) : mSignalReceived(signalReceived)
+       explicit AnimationFinishCheck(bool& signalReceived) : mSignalReceived(signalReceived)
        {
        }
 
index a005a40cb89f9093a519af3301da4f3c90be9290..a76ce7e0dbe14341216cff258735f76f0b3485d5 100755 (executable)
@@ -35,35 +35,35 @@ public:
        {
        }
 
-       TestCallbackBase( void(*function)() )
+       explicit TestCallbackBase( void(*function)() )
        : CallbackBase( reinterpret_cast< CallbackBase::Function >( function ) )
        { }
        template< typename R >
-       TestCallbackBase( R(*function)() )
+       explicit TestCallbackBase( R(*function)() )
        : CallbackBase( reinterpret_cast< CallbackBase::Function >( function ) )
        { }
        template< typename P1 >
-       TestCallbackBase( void(*function)(P1) )
+       explicit TestCallbackBase( void(*function)(P1) )
        : CallbackBase( reinterpret_cast< CallbackBase::Function >( function ) )
        { }
        template< typename P1, typename R >
-       TestCallbackBase( R(*function)(P1)  )
+       explicit TestCallbackBase( R(*function)(P1)  )
        : CallbackBase( reinterpret_cast< CallbackBase::Function >( function ) )
        { }
        template< typename P1, typename P2 >
-       TestCallbackBase( void(*function)(P1,P2)  )
+       explicit TestCallbackBase( void(*function)(P1,P2)  )
        : CallbackBase( reinterpret_cast< CallbackBase::Function >( function ) )
        { }
        template< typename P1, typename P2, typename R >
-       TestCallbackBase( R(*function)(P1,P2) )
+       explicit TestCallbackBase( R(*function)(P1,P2) )
        : CallbackBase( reinterpret_cast< CallbackBase::Function >( function ) )
        { }
        template< typename P1, typename P2, typename P3 >
-       TestCallbackBase( void(*function)(P1,P2,P3)  )
+       explicit TestCallbackBase( void(*function)(P1,P2,P3)  )
        : CallbackBase( reinterpret_cast< CallbackBase::Function >( function ) )
        { }
        template< typename P1, typename P2, typename P3, typename R >
-       TestCallbackBase( R(*function)(P1,P2,P3) )
+       explicit TestCallbackBase( R(*function)(P1,P2,P3) )
        : CallbackBase( reinterpret_cast< CallbackBase::Function >( function ) )
        { }
 };
index a49d7a863dcf57bbdd08b8da1d0207a1a3c7a88b..ecc644db7a99d575ef9d283ea4240d6fe4483215 100755 (executable)
@@ -26,7 +26,7 @@ using namespace Toolkit;
 // Template structure for different type value
 struct STConstraintSourceTypeValue
 {
-       STConstraintSourceTypeValue(bool bValue) : bValue(bValue)
+       explicit STConstraintSourceTypeValue(bool bValue) : bValue(bValue)
        {
        }
 
index a29968d265e854dfd49ccc5d9f4e4cfd162ed726..20c3d8057a96c06ed9fff360ae2553af70479d51 100755 (executable)
@@ -211,7 +211,7 @@ struct STConstraintTypeValue
   {
   }
 
-  STConstraintTypeValue(type tValue) : tValue(tValue)
+  explicit STConstraintTypeValue(type tValue) : tValue(tValue)
   {
   }
   
index 7eb6fcaba74cef824a43876f10021c48a8b3b739..400a54b09da5118a78819ff333bae3484d9b5341 100755 (executable)
@@ -27,7 +27,7 @@ public:
   static const Quaternion QUATERNION_VALUE;
 
   // Construction & Destruction
-  PropertyInputImpl( Property::Type type ) : mType( type ) { }
+  explicit PropertyInputImpl( Property::Type type ) : mType( type ) { }
   virtual ~PropertyInputImpl() { }
 
   // Methods
@@ -67,7 +67,7 @@ struct Vector3PropertyInput : public PropertyInputImpl
 public:
 
   // Construction & Destruction
-  Vector3PropertyInput( Vector3& value )
+  explicit Vector3PropertyInput( Vector3& value )
   : PropertyInputImpl( Property::VECTOR3 ),
     mValue( value )
   {
@@ -91,7 +91,7 @@ struct QuaternionPropertyInput : public PropertyInputImpl
 public:
 
   // Construction & Destruction
-  QuaternionPropertyInput( Quaternion& value )
+  explicit QuaternionPropertyInput( Quaternion& value )
   : PropertyInputImpl( Property::ROTATION ),
     mValue( value )
   {
index 3bf5e71293749d6396188da201b506d11b42d063..a3df863e8c86f32e9c095231bb7856c4be8f517c 100755 (executable)
@@ -45,7 +45,7 @@ namespace
        
        struct KeyEventReceivedFunctor
        {
-               KeyEventReceivedFunctor( KeyEventSignalData& data ) : m_signalData( data )
+               explicit KeyEventReceivedFunctor( KeyEventSignalData& data ) : m_signalData( data )
                {
                
                }
@@ -82,7 +82,7 @@ namespace
 
        struct TouchedFunctor
        {
-               TouchedFunctor( TouchedSignalData& data ) : m_singleData( data )
+               explicit TouchedFunctor( TouchedSignalData& data ) : m_singleData( data )
                {
                
                }
@@ -396,7 +396,7 @@ namespace
                
                private:
 
-               TestCustomActor( Impl::TestCustomActor& impl ) : CustomActor( impl )
+               explicit TestCustomActor( Impl::TestCustomActor& impl ) : CustomActor( impl )
                {
                
                }
index c0bc96c14b82a4f04d87343f7f627a48f400befa..fb34b1b3725d4e216b6ed33596a8ebe36d891c5d 100755 (executable)
@@ -330,7 +330,7 @@ void PropertyMapAnonymousAddChain(void)
        class TestMap
        {
        public:
-               TestMap(Property::Map map)
+               explicit TestMap(Property::Map map)
                : mMap(map)
                {
                }
index b24e966c061ba74b5fc86345a74a1835ca3aeab0..68082237cd369e92006f79c281904dc1cfe2d536 100755 (executable)
@@ -96,7 +96,7 @@ class PropertyNotificationConstWrapper
 {
 public:
 
-       PropertyNotificationConstWrapper(PropertyNotification propertyNotification):mPropertyNotification(propertyNotification)
+       explicit PropertyNotificationConstWrapper(PropertyNotification propertyNotification):mPropertyNotification(propertyNotification)
        {
 
        }
index 63d9754dc8971495cc4d2ab08e700bb2d50cdf28..e58062081bb42e2cce1aa0f8605fbedd7e6b8167 100755 (executable)
@@ -197,12 +197,12 @@ public:
 
 private:
 
-  CustomActorRegistered(Internal::CustomActor* pInternal)
+  explicit CustomActorRegistered(Internal::CustomActor* pInternal)
   : CustomActor(pInternal)
   {
   }
 
-  CustomActorRegistered( ImplPr::CustomActorRegistered& impl )
+  explicit CustomActorRegistered( ImplPr::CustomActorRegistered& impl )
   : CustomActor( impl )
   {
   }
index e814f8d3b586727ebd60b36bb02ccbd5610bcea4..e04ceaee67b810576748b7610bf243aa5054fd87 100755 (executable)
@@ -13,7 +13,7 @@ namespace
   template <typename T>
     struct CheckCopyCtorP
     {
-      CheckCopyCtorP(Property::Value value)
+      explicit CheckCopyCtorP(Property::Value value)
       {
         Property::Value copy( value );
         DALI_CHECK_FAIL( !(value.Get<T>() == copy.Get<T>() ) , "Property::Value copy constructor has fialed.");
index 94bfc0b97204b11638f8341319b11a1f273067ca..b0324cb9a933982266450aed99b928a45b864a10 100755 (executable)
@@ -188,12 +188,12 @@ public:
 
 private:
 
-  RegisteredCustomActor(Internal::CustomActor* pInternal)
+  explicit RegisteredCustomActor(Internal::CustomActor* pInternal)
   : CustomActor(pInternal)
   {
   }
 
-  RegisteredCustomActor( ImplSct::RegisteredCustomActor& impl )
+  explicit RegisteredCustomActor( ImplSct::RegisteredCustomActor& impl )
   : CustomActor( impl )
   {
   }
index 91e965400fe4e2fb028524ad991c17c786c5eba1..bcbccad8c959e6c7fd5b7e2b3c5db00274bf1a12 100755 (executable)
@@ -447,7 +447,7 @@ struct VoidConnectFunctorVoid
 /** Functor for void (float) type **/
 struct VoidFunctorFloat
 {
-  VoidFunctorFloat( float* fLastReceivedValue )
+  explicit VoidFunctorFloat( float* fLastReceivedValue )
   : mLastReceivedValue( fLastReceivedValue )
   {
     ++m_nTotalInstanceCount;
index 0e26ff20aeb6f1e1e26a3a1304a785c7a7a51ff3..c59b1e18c268f25d7ac00eff4abc328076483934 100755 (executable)
@@ -198,12 +198,12 @@ public:
 
 private:
 
-  MyTestCustomActor(Dali::Internal::CustomActor* internal)
+  explicit MyTestCustomActor(Dali::Internal::CustomActor* internal)
   : CustomActor(internal)
   {
   }
 
-  MyTestCustomActor( ImplMine::MyTestCustomActor& impl )
+  explicit MyTestCustomActor( ImplMine::MyTestCustomActor& impl )
   : CustomActor( impl )
   {
   }
@@ -249,12 +249,12 @@ public:
 
 private:
 
-  MyTestCustomActor2(Dali::Internal::CustomActor* internal)
+  explicit MyTestCustomActor2(Dali::Internal::CustomActor* internal)
   : CustomActor(internal)
   {
   }
 
-  MyTestCustomActor2( ImplMine::MyTestCustomActor& impl )
+  explicit MyTestCustomActor2( ImplMine::MyTestCustomActor& impl )
   : CustomActor( impl )
   {
   }
index 7ff5a44b68290057a5a0bf4557e82a2443d1124a..b9279c0bfd7a687ac7e9cd24b7a999c0ff42d599 100755 (executable)
@@ -72,7 +72,7 @@ struct SignalData
 // Functor that sets the data when called
 struct GestureReceivedFunctor
 {
-  GestureReceivedFunctor(SignalData& data) : signalData(data) { }
+  explicit GestureReceivedFunctor(SignalData& data) : signalData(data) { }
 
   void operator()(Actor actor, LongPressGesture longPress)
   {
@@ -338,12 +338,12 @@ public:
 
 private:
 
-  TestCustomActorForTypeRegistry(Internal::CustomActor* internal)
+  explicit TestCustomActorForTypeRegistry(Internal::CustomActor* internal)
   : CustomActor(internal)
   {
   }
 
-  TestCustomActorForTypeRegistry( Impl::TestCustomActorForTypeRegistry& impl )
+  explicit TestCustomActorForTypeRegistry( Impl::TestCustomActorForTypeRegistry& impl )
   : CustomActor( impl )
   {
   }
@@ -389,12 +389,12 @@ public:
 
 private:
 
-  TestCustomActorForTypeRegistry_2(Internal::CustomActor* internal)
+  explicit TestCustomActorForTypeRegistry_2(Internal::CustomActor* internal)
   : CustomActor(internal)
   {
   }
 
-  TestCustomActorForTypeRegistry_2( Impl::TestCustomActorForTypeRegistry& impl )
+  explicit TestCustomActorForTypeRegistry_2( Impl::TestCustomActorForTypeRegistry& impl )
   : CustomActor( impl )
   {
   }
index af28da28159cb864495da3eb4782d76735a4217c..b404f70b886a1af9827b43a53846bf425afcaffb 100755 (executable)
@@ -31,7 +31,7 @@ void ITs_accessibility_manager_cleanup(void)
 class FocusChangedCallback : public Dali::ConnectionTracker
 {
 public:
-  FocusChangedCallback(bool& signalReceived)
+  explicit FocusChangedCallback(bool& signalReceived)
   : m_bSignalVerified(signalReceived),
     m_OriginalFocusedActor(),
     m_CurrentFocusedActor()
@@ -63,7 +63,7 @@ public:
 class FocusOvershotCallback : public Dali::ConnectionTracker
 {
 public:
-  FocusOvershotCallback(bool& signalReceived)
+  explicit FocusOvershotCallback(bool& signalReceived)
   : m_bSignalVerified(signalReceived),
     m_CurrentFocusedActor(),
     m_FocusOvershotDirection(Toolkit::AccessibilityManager::OVERSHOT_NEXT)
index a2cb5991877fcdaa018afcfb596571232d2549a2..ca0307b7e9ce8d6ebd3a530bf1034e85624a6a5c 100755 (executable)
@@ -18,7 +18,7 @@ namespace
 class KeyboardPreFocusChangeCallback : public Dali::ConnectionTracker
 {
 public:
-       KeyboardPreFocusChangeCallback(bool& bsignalReceived)
+       explicit KeyboardPreFocusChangeCallback(bool& bsignalReceived)
        : m_bSignalVerified(bsignalReceived),
        m_CurrentFocusedActor(),
        m_ProposedActorToFocus(),
@@ -55,7 +55,7 @@ public:
 class KeyboardFocusChangedCallback : public Dali::ConnectionTracker
 {
 public:
-       KeyboardFocusChangedCallback(bool& bsignalReceived)
+       explicit KeyboardFocusChangedCallback(bool& bsignalReceived)
        : m_bSignalVerified(bsignalReceived),
        m_OriginalFocusedActor(),
        m_CurrentFocusedActor()
index 112b0b6a608c0b81710bad141d5eaf294d59c5cc..72677f73d5c38a732d4010f75cfc76352e50e669 100755 (executable)
@@ -109,7 +109,7 @@ struct ScrollviewSumConstraint
   /**
    * @param[in] offset The offset to be added to current.
    */
-  ScrollviewSumConstraint(const Vector3& offset):m_Offset(offset)
+  explicit ScrollviewSumConstraint(const Vector3& offset):m_Offset(offset)
   {
   }
 
index c63a5072ec66576b1d5bdb3c21605972c743d4b0..370b9c459f573c46b9d70627fb8fde4f404fa5f9 100755 (executable)
@@ -388,7 +388,7 @@ bool DataControlInsertSelectSqlData(void)
        snprintf(word_desc_len, 16, "%d", strlen("'word_0 initially'") - 2);
 
        memset(g_szWhere, 0, QUERYSIZE);
-       sprintf(g_szWhere, "rowid<3");
+       snprintf(g_szWhere, QUERYSIZE-1, "rowid<3");
 
        g_pstData = bundle_create();
        if ( g_pstData == NULL )
index d0b4f3bf3bfa87b3b1dd9901d600d3f1e8af183b..df6ced6d3d76175989558361160b47ee11d5c915 100755 (executable)
@@ -265,7 +265,7 @@ int ITc_data_control_provider_data_control_provider_create_delete_statement_p(vo
        START_TEST;
 
        memset(g_szWhere, 0, QUERYSIZE);
-       sprintf(g_szWhere, "rowid=1");
+       snprintf(g_szWhere, QUERYSIZE-1, "rowid=1");
 
        // Target API
        char *pszQuery = data_control_provider_create_delete_statement(g_stSqlProvider, g_szWhere);
@@ -331,7 +331,7 @@ int ITc_data_control_provider_data_control_provider_create_update_statement_p(vo
        START_TEST;
 
        memset(g_szWhere, 0, QUERYSIZE);
-       sprintf(g_szWhere, "rowid=1");
+       snprintf(g_szWhere, QUERYSIZE-1, "rowid=1");
 
        bundle *pstData = bundle_create();
        if ( pstData == NULL )
@@ -371,7 +371,7 @@ int ITc_data_control_provider_data_control_provider_create_select_statement_p(vo
        START_TEST;
 
        memset(g_szWhere, 0, QUERYSIZE);
-       sprintf(g_szWhere, "rowid=1");
+       snprintf(g_szWhere, QUERYSIZE-1, "rowid=1");
 
        const char *pszColoumn = DUMMYKEY;
        const char *pszOrder = "WORD ASC";
index 355ba19af60ffb6699930e3018ce1ead9999f466..74e0ffb2363d102d76340f7b23ab2834fe349933 100755 (executable)
@@ -964,7 +964,7 @@ int ITc_data_control_sql_data_control_sql_register_unregister_response_cb_p(void
 
        bundle_add_str(pstData, DUMMYKEY, DUMMYVALUE);
        memset(g_szWhere, 0, QUERYSIZE);
-       sprintf(g_szWhere, "rowid=1");
+       snprintf(g_szWhere, QUERYSIZE-1, "rowid=1");
 
        data_control_sql_response_cb stSqlCallBack = {0};
        stSqlCallBack.insert_cb = DataControlSqlInsertResponseCb;
@@ -1062,7 +1062,7 @@ int ITc_data_control_sql_data_control_sql_insert_delete_p(void)
 
        bundle_add_str(pstData, DUMMYKEY, DUMMYVALUE);
        memset(g_szWhere, 0, QUERYSIZE);
-       sprintf(g_szWhere, "rowid=1");
+       snprintf(g_szWhere, QUERYSIZE-1, "rowid=1");
 
        g_bCallbackHit = false;
        g_bIsInsertDataCheck = true;
@@ -1155,7 +1155,7 @@ int ITc_data_control_sql_data_control_sql_update_select_p(void)
        bundle_add_str(pstData, DUMMYKEY, DUMMYVALUE);
        memset(g_szWhere, 0, QUERYSIZE);
        memset(g_szWordDesc, 0, sizeof(g_szWordDesc));
-       sprintf(g_szWhere, "rowid=1");
+       snprintf(g_szWhere, QUERYSIZE-1, "rowid=1");
 
        bundle *pstNewData = bundle_create();
        if ( pstNewData == NULL )
@@ -1281,7 +1281,7 @@ int ITc_data_control_sql_data_control_sql_select_with_page_p(void)
 
        bundle_add_str(pstData, DUMMYKEY, DUMMYVALUE);
        memset(g_szWhere, 0, QUERYSIZE);
-       sprintf(g_szWhere, "rowid=1");
+       snprintf(g_szWhere, QUERYSIZE-1, "rowid=1");
        const char *pszOrder = "WORD ASC";
        char *pszKey = DUMMYKEY;
 
index d58b042fb777955ca5df8b3687def34a77d440ae..ab6a76435408e14978e64af2bef194cd1f18d08a 100755 (executable)
@@ -168,7 +168,7 @@ char* EmailGetDataPath(char *pszFileName)
        pszImgPath = (char*) calloc(1, strlen(pszAppData) + strlen(pszFileName) + 1);
        if(pszImgPath == NULL)
                return pszImgPath;
-       sprintf(pszImgPath, "%s%s",pszAppData, pszFileName );
+       snprintf(pszImgPath, strlen(pszAppData) + strlen(pszFileName) + 1, "%s%s",pszAppData, pszFileName );
        FPRINTF("[Line : %d][%s] app_get_data_path() is %s\\n", __LINE__, API_NAMESPACE, pszImgPath);
        return pszImgPath;
 }
index 9d1ddf9a0c2686cd0cef01275cb3639a53d8ee83..1bf0ead0959ba52d1ff9805384df9ecf83d91d29 100755 (executable)
@@ -80,7 +80,7 @@ void ITs_email_startup(void)
                {
                        FPRINTF("[Line : %d][%s] GetValueFromConfigFile returned error in start-up\\n", __LINE__, API_NAMESPACE);
 
-                       strcpy(g_pstrRecipient, EMAILADDRESS);
+                       strncpy(g_pstrRecipient, EMAILADDRESS, CONFIG_VALUE_LEN_MAX-1);
                        FPRINTF("[Line : %d][%s] Using recipient address : %s\\n", __LINE__, API_NAMESPACE, EMAILADDRESS);
                }
        }
index 73f18959ecb4707be3e9782690f2f64574744345..dbc04fd0340d56c2c91a72f5457d2913f4e22fe6 100755 (executable)
@@ -183,7 +183,7 @@ bool ImageUtilGetDataPath(char* pAppDataPath)
                return false;
        }
 
-       strcpy(pAppDataPath, pPath);
+       strncpy(pAppDataPath, pPath, PATH_LEN-1);
 
        FPRINTF("[Line : %d][%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
 
@@ -211,8 +211,8 @@ bool ImageUtilAppendToAppDataPath(char* pInputPath, char* pFinalPath)
        }
 
        memset(pFinalPath, 0, PATH_LEN);
-       strcpy(pFinalPath, pAppDataPath);
-       strcat(pFinalPath, pInputPath);
+       strncpy(pFinalPath, pAppDataPath, PATH_LEN-1);
+       strncat(pFinalPath, pInputPath, strlen(pInputPath)+1);
 
        FPRINTF("[Line : %d][%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
 
index c43f7672a7d4c896ef4f296bfd646916adb157dc..557381e7ad86c3df013b65b1bcbdfd75328b810b 100755 (executable)
@@ -46,7 +46,7 @@ bool KeyManagerGetDataPath(char* pAppDataPath)
                return false;
        }
 
-       strcpy(pAppDataPath, pPath);
+       strncpy(pAppDataPath, pPath, PATH_LEN-1);
 
        FPRINTF("[Line : %d][%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
 
@@ -74,8 +74,8 @@ bool KeyManagerAppendToAppDataPath(char* pInputPath, char* pFinalPath)
        }
 
        memset(pFinalPath, 0, PATH_LEN);
-       strcpy(pFinalPath, pAppDataPath);
-       strcat(pFinalPath, pInputPath);
+       strncpy(pFinalPath, pAppDataPath, PATH_LEN-1);
+       strncat(pFinalPath, pInputPath, strlen(pInputPath)+1);
 
        FPRINTF("[Line : %d][%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
 
index ddff3fdc10ee0c7e349583d53fd33e42e479ef1f..0c45503d184638c369390fa25978dbcd7e49822b 100755 (executable)
@@ -74,7 +74,7 @@ void ITs_media_content_audio_meta_startup(void)
        nRet = media_info_get_media_id(g_hAudioInfo, &pszMediaId);
        PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_get_media_id", MediaContentGetError(nRet), media_content_disconnect());
        memset(g_szAudioId, 0, PATHLEN);
-       strcpy(g_szAudioId, pszMediaId);
+       strncpy(g_szAudioId, pszMediaId, PATHLEN-1);
        FREE_MEMORY(pszMediaId);
 
        nRet = media_info_get_audio(g_hAudioInfo, &g_hAudioMeta);
index 51baaf33fcd7935fa797862137f4ebaf369d9cb9..fe6fb5b3f72f6c4821f3a3a3ab9c4d9123372bd6 100755 (executable)
@@ -67,7 +67,7 @@ static bool ForeachMediaCb(media_info_h media, void *user_data)
                PRINT_RESULTFALSE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_get_media_id", MediaContentGetError(nRet), QuitGmainLoop());
 
                memset(g_szMediaId, 0, PATHLEN);
-               strcpy(g_szMediaId, szMediaId);
+               strncpy(g_szMediaId, szMediaId, PATHLEN-1);
                FREE_MEMORY(szMediaId);
                g_CallBackHit = true;
                QuitGmainLoop();
index 91eaf076539813df7e696443454a17496567ce26..fbf8fc4bf341a22d693af79a2936c6a1b84ee3d8 100755 (executable)
@@ -184,9 +184,9 @@ bool GetInternalStorageIdandPath(void)
 void AppendPaths(char *FirstPath, char *SecondPath, char *FinalPath)
 {
        memset(FinalPath, 0, PATHLEN);
-       strcpy(FinalPath, FirstPath);
-       strcat(FinalPath, "/");
-       strcat(FinalPath, SecondPath);
+       strncpy(FinalPath, FirstPath, PATHLEN-1);
+       strncat(FinalPath, "/", PATHLEN-1-strlen(FinalPath));
+       strncat(FinalPath, SecondPath, PATHLEN-1-strlen(FinalPath));
 
        FPRINTF("[Line : %d][%s] Appended Path is : %s\\n", __LINE__, API_NAMESPACE, FinalPath);
 }
@@ -205,7 +205,7 @@ bool GetFolderPath(int WhichFolder, char *FinalPath)
        CHECK_HANDLE(pszTempPath, "storage_get_directory");
 
        memset(FinalPath, 0, PATHLEN);
-       strcpy(FinalPath, pszTempPath);
+       strncpy(FinalPath, pszTempPath, PATHLEN-1);
        FREE_MEMORY(pszTempPath);
 
        FPRINTF("[Line : %d][%s] Folder Path is : %s\\n", __LINE__, API_NAMESPACE, FinalPath);
@@ -221,8 +221,8 @@ bool GetFolderPath(int WhichFolder, char *FinalPath)
 void AppendSlash(char *FirstPath, char *FinalPath)
 {
        memset(FinalPath, 0, PATHLEN);
-       strcpy(FinalPath, FirstPath);
-       strcat(FinalPath, "/");
+       strncpy(FinalPath, FirstPath, PATHLEN-1);
+       strncat(FinalPath, "/", PATHLEN-1-strlen(FinalPath));
 
        FPRINTF("[Line : %d][%s] Appended Path is : %s\\n", __LINE__, API_NAMESPACE, FinalPath);
 }
index 71d3f9a4b6703cbe2cdc6cd87a48be9bde67faf1..77dab7b5388aab4c617feac905ffcf6d2329ab5d 100755 (executable)
@@ -110,7 +110,7 @@ struct stat stBuff;
        nRet = media_info_get_media_id(g_hImageInfo, &pszMediaId);
        PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_get_media_id", MediaContentGetError(nRet), media_content_disconnect());
        memset(g_szImageId, 0, PATHLEN);
-       strcpy(g_szImageId, pszMediaId);
+       strncpy(g_szImageId, pszMediaId, PATHLEN-1);
        FREE_MEMORY(pszMediaId);
        
        nRet = media_face_create(g_szImageId,&g_hFace);
index 3f0756807d07d553c9bcc2b835e95ba180e94a42..3c1c9bb0360b678719144bac278bccb4256e5c67 100755 (executable)
@@ -80,7 +80,7 @@ void ITs_media_content_image_meta_startup(void)
        nRet = media_info_get_media_id(g_hImageInfo, &pszMediaId);
        PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_get_media_id", MediaContentGetError(nRet), media_content_disconnect());
        memset(g_szImageId, 0, PATHLEN);
-       strcpy(g_szImageId, pszMediaId);
+       strncpy(g_szImageId, pszMediaId, PATHLEN - 1);
        FREE_MEMORY(pszMediaId);
 
        nRet = media_info_get_image(g_hImageInfo, &g_hImageMeta);
index e3ee638a458ed515f292d750ab11f5981b7fbd72..e2e4dbf2aa5583235633a5ebcffde7529feece71 100755 (executable)
@@ -492,7 +492,7 @@ void ITs_media_content_info_startup(void)
        nRet = media_info_get_media_id(g_hAudioInfo, &pszMediaId);
        PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_get_media_id", MediaContentGetError(nRet), media_content_disconnect());
        memset(g_szAudioId, 0, PATHLEN);
-       strcpy(g_szAudioId, pszMediaId);
+       strncpy(g_szAudioId, pszMediaId, PATHLEN - 1);
        FREE_MEMORY(pszMediaId);
 
        nRet = GetFolderPath(STORAGE_DIRECTORY_IMAGES, g_szImageFolder);
@@ -505,7 +505,7 @@ void ITs_media_content_info_startup(void)
        nRet = media_info_get_media_id(g_hImageInfo, &pszMediaId);
        PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_get_media_id", MediaContentGetError(nRet), media_content_disconnect());
        memset(g_szImageId, 0, PATHLEN);
-       strcpy(g_szImageId, pszMediaId);
+       strncpy(g_szImageId, pszMediaId, PATHLEN - 1);
        FREE_MEMORY(pszMediaId);
 
        nRet = GetFolderPath(STORAGE_DIRECTORY_VIDEOS, g_szVideoFolder);
@@ -518,7 +518,7 @@ void ITs_media_content_info_startup(void)
        nRet = media_info_get_media_id(g_hVideoInfo, &pszMediaId);
        PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_get_media_id", MediaContentGetError(nRet), media_content_disconnect());
        memset(g_szVideoId, 0, PATHLEN);
-       strcpy(g_szVideoId, pszMediaId);
+       strncpy(g_szVideoId, pszMediaId, PATHLEN - 1);
        FREE_MEMORY(pszMediaId);
 
        g_bMediaContentStartup = true;
@@ -705,7 +705,7 @@ int ITc_media_info_insert_to_db_p(void)
        nRet = media_info_get_media_id(g_hAudioInfo, &pszMediaId);
        PRINT_RESULT(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_get_media_id", MediaContentGetError(nRet));
        memset(g_szAudioId, 0, PATHLEN);
-       strncpy(g_szAudioId, pszMediaId, sizeof(g_szAudioId));
+       strncpy(g_szAudioId, pszMediaId, PATHLEN - 1);
        FREE_MEMORY(pszMediaId);
 
        return 0;
index 969500dd47def097c24a813ce52bbc39cff451a2..870d005e76bbcf4688d03759f83bad62681f0032 100755 (executable)
@@ -78,7 +78,7 @@ static bool ForeachMediaCb(media_info_h media, void *user_data)
                PRINT_RESULTFALSE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_get_media_id", MediaContentGetError(nRet), QuitGmainLoop());
 
                memset(g_szMediaId, 0, PATHLEN);
-               strcpy(g_szMediaId, szMediaId);
+               strncpy(g_szMediaId, szMediaId, PATHLEN - 1);
                FREE_MEMORY(szMediaId);
                g_CallBackHit = true;
                QuitGmainLoop();
index 4635936e8af4f50675e5af873b91e274fb0c43b8..dfa1155d9ad915283ea76e0915a09fc6b371925d 100755 (executable)
@@ -64,7 +64,7 @@ static bool ForeachMediaCb(media_info_h media, void *user_data)
                PRINT_RESULTFALSE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_get_media_id", MediaContentGetError(nRet), QuitGmainLoop());
 
                memset(g_szMediaId, 0, PATHLEN);
-               strcpy(g_szMediaId, szMediaId);
+               strncpy(g_szMediaId, szMediaId, PATHLEN - 1);
                FREE_MEMORY(szMediaId);
                g_CallBackHit = true;
                QuitGmainLoop();
index 9c0abb45734eef36328fc8524814a05bc6c985a2..80be5cf4e8ebf4370a509c4fc02aba2b09410c1a 100755 (executable)
@@ -77,7 +77,7 @@ void ITs_media_content_video_meta_startup(void)
        nRet = media_info_get_media_id(g_hVideoInfo, &pszMediaId);
        PRINT_RESULTNONE_CLEANUP(MEDIA_CONTENT_ERROR_NONE, nRet, "media_info_get_media_id", MediaContentGetError(nRet), media_content_disconnect());
        memset(g_szVideoId, 0, PATHLEN);
-       strcpy(g_szVideoId, pszMediaId);
+       strncpy(g_szVideoId, pszMediaId, PATHLEN - 1);
        FREE_MEMORY(pszMediaId);
 
        nRet = media_info_get_video(g_hVideoInfo, &g_hVideoMeta);
index 2d6cc497b6d250e1855a78cbf53a698ed9333f6f..8d4ac5d6816d09e851f6f9415f9811931fe4bd3d 100755 (executable)
@@ -350,7 +350,7 @@ bool MediaVisionGetDataPath(char* pAppDataPath)
                return false;
        }
 
-       strcpy(pAppDataPath, pPath);
+       strncpy(pAppDataPath, pPath, PATHLEN-1);
 
        FPRINTF("[Line : %d][%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
 
@@ -378,8 +378,8 @@ bool MediaVisionAppendToAppDataPath(const char* pInputPath, char* pFinalPath)
        }
 
        memset(pFinalPath, 0, PATHLEN);
-       strcpy(pFinalPath, pAppDataPath);
-       strcat(pFinalPath, pInputPath);
+       strncpy(pFinalPath, pAppDataPath, PATHLEN-1);
+       strncat(pFinalPath, pInputPath, strlen(pInputPath)+1);
        
        FPRINTF("[Line : %d][%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
 
index 135faf42da8b2acd41b82dfacb9e06c970d9784f..6b52225cb9aa9777715ff99e57bf163d8dbb8d58 100755 (executable)
@@ -1118,7 +1118,7 @@ int ITc_mv_face_track_p(void)
 
             frames = (char **) realloc(frames, ++frames_counter * 1024);
 
-            sprintf(frames[frames_counter - 1], "%s/%s", track_seq_path, ent->d_name);
+            snprintf(frames[frames_counter - 1], strlen(track_seq_path)+strlen("/")+strlen(ent->d_name)+1, "%s/%s", track_seq_path, ent->d_name);
         }
         closedir(dir);
     }
index 30259e519d497688be31ebe43249426487674099..ccbea303dfe62c0492a692859f297f5fa63edd01 100644 (file)
@@ -119,7 +119,7 @@ bool StreamRecorderGetDataPath(char* pAppDataPath)
                return false;
        }
 
-       strcpy(pAppDataPath, pPath);
+       strncpy(pAppDataPath, pPath, PATH_LEN-1);
 
        FPRINTF("[Line : %d][%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
 
@@ -147,8 +147,8 @@ bool StreamRecoderAppendToAppDataPath(char* pInputPath, char* pFinalPath)
        }
 
        memset(pFinalPath, 0, PATH_LEN);
-       strcpy(pFinalPath, pAppDataPath);
-       strcat(pFinalPath, pInputPath);
+       strncpy(pFinalPath, pAppDataPath, PATH_LEN-1);
+       strncat(pFinalPath, pInputPath, strlen(pInputPath)+1);
 
        FPRINTF("[Line : %d][%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
 
index a475676041f9cbfb6a6b8e2a62e523d9da69b68e..138dcf5de7126a12e77ac1a560ebbf9e68a491ae 100755 (executable)
@@ -73,7 +73,7 @@ bool MessagesGetDataPath(char* pAppDataPath)
                return false;
        }
 
-       strcpy(pAppDataPath, pPath);
+       strncpy(pAppDataPath, pPath, strlen(pAppDataPath)+1);
 
        FPRINTF("[Line : %d][%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
 
@@ -101,8 +101,8 @@ bool MessagesAppendToAppDataPath(char* pInputPath, char* pFinalPath)
        }
 
        memset(pFinalPath, 0, PATH_LEN);
-       strcpy(pFinalPath, pAppDataPath);
-       strcat(pFinalPath, pInputPath);
+       strncpy(pFinalPath, pAppDataPath, strlen(pFinalPath)+1);
+       strncat(pFinalPath, pInputPath, strlen(pInputPath)+1);
 
        FPRINTF("[Line : %d][%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
 
@@ -128,4 +128,4 @@ gboolean MessagesTimeout(gpointer data)
        return false;
 }
 
-/** @} */ //end of itc-messages
\ No newline at end of file
+/** @} */ //end of itc-messages
index 94c4bbcc8cd3e4cf9039055d85f75f75bea8bc77..614fa0d447757d1476b288be6baa474199e0882f 100755 (executable)
@@ -43,8 +43,8 @@ bool MetadataEditorAppendToAppDataPath(char* pInputPath, char* pFinalPath)
        }
 
        memset(pFinalPath, 0, PATH_LEN);
-       strcpy(pFinalPath, pAppDataPath);
-       strcat(pFinalPath, pInputPath);
+       strncpy(pFinalPath, pAppDataPath, PATH_LEN-1);
+       strncat(pFinalPath, pInputPath, strlen(pInputPath)+1);
 
        FPRINTF("[Line: %d][%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
        return true;
@@ -74,7 +74,7 @@ bool MetadataEditorGetDataPath(char* pAppDataPath)
                return false;
        }
 
-       strcpy(pAppDataPath, pPath);
+       strncpy(pAppDataPath, pPath, PATH_LEN-1);
 
        FPRINTF("[Line: %d][%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
 
index b2f13ae344d8dc8f39c6e3059fbdbd666edf6439..272168848fcce7b3da2c3df9e45f206648a6e883 100755 (executable)
@@ -48,7 +48,7 @@ bool MetadataExtractorGetDataPath(char* pAppDataPath)
                return false;
        }
 
-       strcpy(pAppDataPath, pPath);
+       strncpy(pAppDataPath, pPath, PATH_LEN-1);
 
        FPRINTF("[Line: %d][%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
 
@@ -76,8 +76,8 @@ bool MetadataExtractorAppendToAppDataPath(char* pInputPath, char* pFinalPath)
        }
 
        memset(pFinalPath, 0, PATH_LEN);
-       strcpy(pFinalPath, pAppDataPath);
-       strcat(pFinalPath, pInputPath);
+       strncpy(pFinalPath, pAppDataPath, PATH_LEN-1);
+       strncat(pFinalPath, pInputPath, strlen(pInputPath)+1);
 
        FPRINTF("[Line: %d][%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
        return true;
index c8124388bcc458134500faee148624be2a48a38e..5942b993136b4da033b278de9d043d9c5caba479 100755 (executable)
@@ -139,7 +139,7 @@ char* MotionGetGestureEvent(gesture_event_e nGestureEvent)
                //case GESTURE_EVENT_DETECTED:  szGestureEvent = "GESTURE_EVENT_DETECTED";              break;  /**< The gesture is detected */
                //case GESTURE_SHAKE_DETECTED:  szGestureEvent = "GESTURE_SHAKE_DETECTED";              break;  /**< Shake gesture is detected */
                //case GESTURE_SNAP_X_NEGATIVE: szGestureEvent = "GESTURE_SNAP_X_NEGATIVE";             break;  /**< -X snap is detected */
-       case GESTURE_EVENT_DETECTED:    szGestureEvent = "GESTURE_EVENT_DETECTED or GESTURE_SHAKE_DETECTED or GESTURE_SNAP_X_NEGATIVE";
+       case GESTURE_EVENT_DETECTED:    szGestureEvent = "GESTURE_EVENT_DETECTED or GESTURE_SHAKE_DETECTED or GESTURE_SNAP_X_NEGATIVE"; break;
 
                //case GESTURE_SHAKE_FINISHED:  szGestureEvent = "GESTURE_SHAKE_FINISHED";              break;  /**< Shake gesture finished */
                //case GESTURE_SNAP_X_POSITIVE: szGestureEvent = "GESTURE_SNAP_X_POSITIVE";             break;  /**< +X snap is detected */
index 5d38bb9c5b681fe2e764f5d82ab7d59c06fcf827..98eb167d8a8cfcd3b54fb6cbdf60b5e0aee440b9 100755 (executable)
@@ -702,7 +702,7 @@ int ITc_nfc_ndef_record_set_get_id_p(void)
                return 1;
        }
 
-       sprintf((char *)szSetId, "ID_%d", 1);
+       snprintf((char *)szSetId, sizeof(szSetId)-1, "ID_%d", 1);
        nLength = strlen((char *)szSetId);
 
        int nRet = nfc_ndef_record_set_id(g_hRecord, szSetId, nLength);
index 8d4e227ebb9dc185d74d665da474f655f20de0ba..5b6f730ffa4b120ee86934c3d98c41c6fcae02b8 100755 (executable)
@@ -45,7 +45,7 @@ bool NotificationGetDataPath(char* pAppDataPath)
                return false;
        }
 
-       strcpy(pAppDataPath, pPath);
+       strncpy(pAppDataPath, pPath, PATH_LEN-1);
        FPRINTF("[Line : %d][%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
        return true;
 }
@@ -71,8 +71,8 @@ bool NotificationAppendToAppDataPath(char* pInputPath, char* pFinalPath)
        }
 
        memset(pFinalPath, 0, PATH_LEN);
-       strcpy(pFinalPath, pAppDataPath);
-       strcat(pFinalPath, pInputPath);
+       strncpy(pFinalPath, pAppDataPath, PATH_LEN-1);
+       strncat(pFinalPath, pInputPath, strlen(pInputPath)+1);
 
        FPRINTF("[Line : %d][%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
 
@@ -167,4 +167,4 @@ char* Application_AppControlGetError(int nRet)
        return szErrorVal;
 }
 
-/** @} */ //end of itc-notification
\ No newline at end of file
+/** @} */ //end of itc-notification
index cdfc59286de285777aa2f1e34225038b4c9d06e2..c3783d1c4bc1dfa15d5faf122626f7120cf7788d 100755 (executable)
@@ -60,7 +60,7 @@ bool PlayerGetDataPath(char* pAppDataPath)
                return false;
        }
 
-       strcpy(pAppDataPath, pPath);
+       strncpy(pAppDataPath, pPath, PATH_LEN-1);
        FPRINTF("[Line: %d][%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
        return true;
 }
index bfe9822a6719cc6a8d13dd8f5df14da2f03b4c91..6eb85383006e0b9fb380e9b5ec11e90b89c2808f 100755 (executable)
@@ -360,8 +360,8 @@ void GetFileName(void)
 
        g_RecorderFile = (char *)malloc(strlen(pszPath) + strlen(FILENAME) + 1);
        memset(g_RecorderFile, 0x00, (strlen(pszPath) + strlen(FILENAME) + 1));
-       strcpy(g_RecorderFile, pszPath);
-       strcat(g_RecorderFile, FILENAME);
+       strncpy(g_RecorderFile, pszPath, strlen(pszPath)+1);
+       strncat(g_RecorderFile, FILENAME, strlen(FILENAME)+1);
        FPRINTF("[Line: %d][%s] Output File Path is %s\\n", __LINE__,API_NAMESPACE, g_RecorderFile);
 }
 
index d260b5da95524eb14626f80002ea218a9d70922c..7caa25e6846a96f406f597cdd6f7b248364cd65d 100755 (executable)
@@ -43,7 +43,7 @@ bool RuntimeInfoGetDataPath(char* pAppDataPath)
                return false;
        }
 
-       strcpy(pAppDataPath, pPath);
+       strncpy(pAppDataPath, pPath, strlen(pPath)+1);
        return true;
 }
 
@@ -68,8 +68,8 @@ bool RuntimeInfoAppendToAppDataPath(char* pInputPath, char* pFinalPath)
        }
 
        memset(pFinalPath, 0, PATH_LEN);
-       strcpy(pFinalPath, pAppDataPath);
-       strcat(pFinalPath, pInputPath);
+       strncpy(pFinalPath, pAppDataPath, strlen(pAppDataPath)+1);
+       strncat(pFinalPath, pInputPath, strlen(pInputPath)+1);
        return true;
 }
 
index d53966a537e6686de9c46f823ce86fe06a5452a3..ffe638729de0aeedd74c679b178bb9e35c635f37 100755 (executable)
@@ -195,7 +195,7 @@ bool SttGetDataPath(char* pAppDataPath)
                return false;
        }
 
-       strcpy(pAppDataPath, pPath);
+       strncpy(pAppDataPath, pPath, PATH_LEN-1);
 
        FPRINTF("[Line : %d][%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
 
@@ -223,8 +223,8 @@ bool SttAppendToAppDataPath(char* pInputPath, char* pFinalPath)
        }
 
        memset(pFinalPath, 0, PATH_LEN);
-       strcpy(pFinalPath, pAppDataPath);
-       strcat(pFinalPath, pInputPath);
+       strncpy(pFinalPath, pAppDataPath, PATH_LEN-1);
+       strncat(pFinalPath, pInputPath, strlen(pInputPath)+1);
 
        FPRINTF("[Line : %d][%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
 
index 39f987928fe29f58ed8cd7fd5edfef09a5ac141f..269e6c8b4e18f03223659ed8e828b6e3bba66453 100755 (executable)
@@ -35,6 +35,8 @@
 #define TIMEOUT_CB                                     5000
 #define API_NAMESPACE                          "STT_ITC"
 #define PATH_LEN                                       1024
+#define LANGUAGE_LEN                           256
+#define ENGINE_LEN                                     256
 #define START_SOUND                                    "start_sound.wav"
 #define STOP_SOUND                                     "stop_sound.wav"
 #define TIME_LIMIT                                     20
index 3726bef492a06888f41710d2d81426d83b9cbbbe..35b756e891d34df7110233f73321178ee6e68cb6 100755 (executable)
@@ -156,23 +156,23 @@ void stt_default_language_changed_callback(stt_h stt, const char *previous_langu
 
        if ( g_szPreviousLanguage == NULL )
        {
-               g_szPreviousLanguage = (char *) malloc(256 * sizeof(char));
+               g_szPreviousLanguage = (char *) malloc(LANGUAGE_LEN * sizeof(char));
        }
        else
        {
-               memset(g_szPreviousLanguage, 0, 256);
+               memset(g_szPreviousLanguage, 0, LANGUAGE_LEN);
        }
-       strcpy(g_szPreviousLanguage, previous_language);
+       strncpy(g_szPreviousLanguage, previous_language, LANGUAGE_LEN-1);
 
        if ( g_szCurrentLanguage == NULL )
        {
-               g_szCurrentLanguage = (char *) malloc(256 * sizeof(char));
+               g_szCurrentLanguage = (char *) malloc(LANGUAGE_LEN * sizeof(char));
        }
        else
        {
-               memset(g_szCurrentLanguage, 0, 256);
+               memset(g_szCurrentLanguage, 0, LANGUAGE_LEN);
        }
-       strcpy(g_szCurrentLanguage, current_language);
+       strncpy(g_szCurrentLanguage, current_language, LANGUAGE_LEN-1);
 }
 
 /**
@@ -360,23 +360,23 @@ bool stt_supported_engine_callback(stt_h stt, const char *engine_id, const char
 
        if ( g_szSupportedEngineIDs[g_nSupportedEngineCount] == NULL )
        {
-               g_szSupportedEngineIDs[g_nSupportedEngineCount] = (char *) malloc(256 * sizeof(char));
+               g_szSupportedEngineIDs[g_nSupportedEngineCount] = (char *) malloc(ENGINE_LEN * sizeof(char));
        }
        else
        {
-               memset(g_szSupportedEngineIDs[g_nSupportedEngineCount], 0, 256);
+               memset(g_szSupportedEngineIDs[g_nSupportedEngineCount], 0, ENGINE_LEN);
        }
-       strcpy(g_szSupportedEngineIDs[g_nSupportedEngineCount], engine_id);
+       strncpy(g_szSupportedEngineIDs[g_nSupportedEngineCount], engine_id, ENGINE_LEN-1);
 
        if ( g_szSupportedEngineNames[g_nSupportedEngineCount] == NULL )
        {
-               g_szSupportedEngineNames[g_nSupportedEngineCount] = (char *) malloc(256 * sizeof(char));
+               g_szSupportedEngineNames[g_nSupportedEngineCount] = (char *) malloc(ENGINE_LEN * sizeof(char));
        }
        else
        {
-               memset(g_szSupportedEngineNames[g_nSupportedEngineCount], 0, 256);
+               memset(g_szSupportedEngineNames[g_nSupportedEngineCount], 0, ENGINE_LEN);
        }
-       strcpy(g_szSupportedEngineNames[g_nSupportedEngineCount], engine_name);
+       strncpy(g_szSupportedEngineNames[g_nSupportedEngineCount], engine_name, ENGINE_LEN-1);
 
        g_nSupportedEngineCount++;
 
@@ -422,13 +422,13 @@ bool stt_supported_language_callback(stt_h stt, const char *language, void *user
 
        if ( g_szSupportedLanguages[g_nSupportedLanguageCount] == NULL )
        {
-               g_szSupportedLanguages[g_nSupportedLanguageCount] = (char *) malloc(256 * sizeof(char));
+               g_szSupportedLanguages[g_nSupportedLanguageCount] = (char *) malloc(LANGUAGE_LEN * sizeof(char));
        }
        else
        {
-               memset(g_szSupportedLanguages[g_nSupportedLanguageCount], 0, 256);
+               memset(g_szSupportedLanguages[g_nSupportedLanguageCount], 0, LANGUAGE_LEN);
        }
-       strcpy(g_szSupportedLanguages[g_nSupportedLanguageCount], language);
+       strncpy(g_szSupportedLanguages[g_nSupportedLanguageCount], language, LANGUAGE_LEN-1);
        g_nSupportedLanguageCount++;
 
        return true;
index 3f8ac27e563e25523c10bc0ab8df779a02ddea4c..336aaf8d1dc482a9f34f0b5b7e7d83642e1f2bb8 100755 (executable)
@@ -94,7 +94,7 @@ char* ThumbnailGetDataPath(char *pszFileName)
        pszImgPath = (char*) calloc(1, strlen(pszAppData) + strlen(pszFileName)+1);
        if (pszImgPath == NULL)
                return pszImgPath;
-       sprintf(pszImgPath, "%s%s",pszAppData, pszFileName );
+       snprintf(pszImgPath, strlen(pszAppData) + strlen(pszFileName) + 1, "%s%s",pszAppData, pszFileName );
        FPRINTF("[Line : %d][%s] app_get_data_path() is %s\\n", __LINE__, API_NAMESPACE, pszImgPath);
        return pszImgPath;
 }
index 7e0e317f448d3214df4281fcd9089f3e6488eb6c..6b794afae12d27d1dcbbf095996fb9e04055a562 100755 (executable)
@@ -181,6 +181,7 @@ static void app_control(app_control_h app_control, void *data)
                                dlog_print(DLOG_INFO, "NativeTCT", "%s must be exited", func_name);
                                ui_app_exit();
                        }
+                       FREE_MEMORY_TC(func_name);
                        return;
                }
        }
@@ -188,6 +189,7 @@ static void app_control(app_control_h app_control, void *data)
        dlog_print(DLOG_ERROR, "NativeTCT", "[%s:%d] Unable to execute %s : Unknown Test Case Name", __FUNCTION__, __LINE__, func_name);
 
        printf("Unknown testcase name: \"%s\"\n", func_name);
+       FREE_MEMORY_TC(func_name);
        return;
 }
 
index 13a47c183a6bbb2cbf8c11be8fd1524730cba339..064a9fd92d50d86c1ecdfe20519be8703b50519c 100755 (executable)
@@ -118,7 +118,7 @@ static void RunApp(char *pszTargetApp, char *pszKey, char *pszValue, int nCompId
                        return;
                }
        }
-       sprintf(pszCompId, "%d", nCompId);
+       snprintf(pszCompId, sizeof(pszCompId)-1, "%d", nCompId);
        nRet = app_control_add_extra_data(hAppControl, "COMP_ID", pszCompId);
        if(nRet != APP_CONTROL_ERROR_NONE)
        {
index 2b7da5ab498f3f160dee290a122c5189aa239524..4c3f2b6ec8b5b0e62933e44ad9cbed5cdbe5f684 100755 (executable)
@@ -93,7 +93,7 @@ bool WavPlayerGetDataPath(char* pAppDataPath)
                return false;
        }
 
-       strcpy(pAppDataPath, pPath);
+       strncpy(pAppDataPath, pPath, PATH_LEN-1);
        FPRINTF("[Line : %d][%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
        return true;
 }
@@ -119,8 +119,8 @@ bool WavPlayerAppendToAppDataPath(char* pInputPath, char* pFinalPath)
        }
 
        memset(pFinalPath, 0, PATH_LEN);
-       strcpy(pFinalPath, pAppDataPath);
-       strcat(pFinalPath, pInputPath);
+       strncpy(pFinalPath, pAppDataPath, PATH_LEN-1);
+       strncat(pFinalPath, pInputPath, strlen(pInputPath)+1);
        FPRINTF("[Line : %d][%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
        return true;
 }
index ea197d4dfcb680e72a11eb480f3154a5d7dd4c40..9f53a752ff66e65531184e8c7ad4424d07005bbc 100755 (executable)
@@ -46,7 +46,7 @@ bool Webkit_EFLGetDataPath(char* pAppDataPath)
                return false;
        }
 
-       strcpy(pAppDataPath, pPath);
+       strncpy(pAppDataPath, pPath, PATH_LEN-1);
        FPRINTF("[Line : %d][%s] application data path returned = %s\\n", __LINE__, API_NAMESPACE, pAppDataPath);
        return true;
 }
@@ -72,8 +72,8 @@ bool Webkit_EFLAppendToAppDataPath(char* pInputPath, char* pFinalPath)
        }
 
        memset(pFinalPath, 0, PATH_LEN);
-       strcpy(pFinalPath, pAppDataPath);
-       strcat(pFinalPath, pInputPath);
+       strncpy(pFinalPath, pAppDataPath, PATH_LEN-1);
+       strncat(pFinalPath, pInputPath, strlen(pInputPath)+1);
 
        return true;
 }
@@ -99,8 +99,8 @@ bool Webkit_EFLAppendToDataPathWithFileFormat(char* pInputPath, char* pFinalPath
        }
 
        memset(pFinalPath, 0, PATH_LEN);
-       strcpy(pFinalPath, "file://"); //file prefix appended
-       strcat(pFinalPath, pFileAppDataPath);
+       strncpy(pFinalPath, "file://", PATH_LEN-1); //file prefix appended
+       strncat(pFinalPath, pFileAppDataPath, strlen(pFileAppDataPath)+1);
 
        FPRINTF("[Line : %d][%s] result path returned = %s\\n", __LINE__, API_NAMESPACE, pFinalPath);
 
@@ -221,7 +221,7 @@ Ewk_Autofill_Profile* GetEwkAFillProf()
        }
        
        char id[10];
-       sprintf(id,"%d",TEST_AUTOFILL_PROFILE_ID);
+       snprintf(id, sizeof(id)-1, "%d",TEST_AUTOFILL_PROFILE_ID);
        ewk_autofill_profile_data_set(profile, EWK_PROFILE_ID, id);
        ewk_autofill_profile_data_set(profile, EWK_PROFILE_NAME, TEST_AUTOFILL_PROFILE_NAME);
        ewk_autofill_profile_data_set(profile, EWK_PROFILE_COMPANY, TEST_AUTOFILL_PROFILE_COMPANY);
index aa5bfd42f6982bb044a837e4cf014db944220daa..ab23d8764e2be2b9938c9fc3416ab7af73236f0f 100755 (executable)
@@ -882,7 +882,7 @@ int ITc_ewk_intercept_request_response_header_add_p(void)
        g_BodyDone = (char*)malloc((size + 1) * sizeof(char));
        CHECK_HANDLE_CLEANUP(g_BodyDone,"malloc:failure:ITc_ewk_intercept_request_response_header_add_p",free(g_BodyAjaxTestDone));
 
-       snprintf(g_BodyDone, size+1, g_BodyFormat, g_BaseTitle, g_BodyAjaxTestDone, g_InterceptUrlAjax);
+       snprintf(g_BodyDone, size+1, g_BodyFormat, g_BaseTitle);
 
        size = snprintf(NULL, 0, g_Expected_title_format, g_Test_header_field_1, g_Test_header_value_1, g_Test_header_field_2, g_Test_header_value_2);
        g_Expected_title_done = (char*)malloc((size + 1) * sizeof(char));
@@ -977,10 +977,10 @@ int ITc_ewk_intercept_request_response_header_map_add_p(void)
        CHECK_HANDLE(g_BodyAjaxTestDone, "Malloc failure:ITc_ewk_intercept_request_response_header_map_add_p")
        snprintf(g_BodyAjaxTestDone, size+1, g_BodyAjaxTestFormat, g_Test_header_field_1, g_Test_header_field_1, g_Test_header_field_2, g_Test_header_field_2);
 
-        size = snprintf(NULL, 0, g_BodyFormat, g_BaseTitle, g_BodyAjaxTestDone, g_InterceptUrlAjax);
+       size = snprintf(NULL, 0, g_BodyFormat, g_BaseTitle, g_BodyAjaxTestDone, g_InterceptUrlAjax);
        g_BodyDone = (char*)malloc((size + 1) * sizeof(char));
        CHECK_HANDLE_CLEANUP(g_BodyDone, "Malloc failure :ITc_ewk_intercept_request_response_header_map_add_p",free(g_BodyAjaxTestDone))
-       snprintf(g_BodyDone, size+1, g_BodyFormat, g_BaseTitle, g_BodyAjaxTestDone, g_InterceptUrlAjax);
+       snprintf(g_BodyDone, size+1, g_BodyFormat, g_BaseTitle);
 
        size = snprintf(NULL, 0, g_Expected_title_format, g_Test_header_field_1, g_Test_header_value_1, g_Test_header_field_2, g_Test_header_value_2);
        g_Expected_title_done = (char*)malloc((size + 1) * sizeof(char));
@@ -1160,7 +1160,7 @@ int ITc_ewk_intercept_request_response_status_set_p(void)
        int size = snprintf(NULL, 0, g_BodyFormat, g_BaseTitle, g_BodyAjaxTestDoneStatusSet, g_InterceptUrlAjax);
        g_BodyDone = (char*)malloc((size + 1) * sizeof(char));
        CHECK_HANDLE(g_BodyDone, "Malloc failure:ITc_ewk_intercept_request_response_status_set_p");
-       snprintf(g_BodyDone, size+1, g_BodyFormat, g_BaseTitle, g_BodyAjaxTestDoneStatusSet, g_InterceptUrlAjax);
+       snprintf(g_BodyDone, size+1, g_BodyFormat, g_BaseTitle);
 
        evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,finished", webkit_EFL_LoadFinished, NULL);
        evas_object_smart_callback_add(objWebkit_EFL_view.webview, "load,error", webkit_EFL_LoadError, NULL);
index 8226085e3588e69cfc533d0ab935d01d6eacdf6d..a92ce9fefcb1efcf6cea530e6c087f12b02ef8f6 100755 (executable)
@@ -54,8 +54,8 @@ static int WidgetListCB(const char *pkgid, const char *widgetid, int is_prime, v
                g_bWidgetServiceCBFlag = true;
                FPRINTF("[Line: %d][%s] In WidgetListCB\\n", __LINE__, API_NAMESPACE);
 
-               strcpy(g_szPkgid,pkgid);
-               strcpy(g_szWidgetid,widgetid);
+               strncpy(g_szPkgid, pkgid, strlen(pkgid)+1);
+               strncpy(g_szWidgetid, widgetid, strlen(widgetid)+1);
                FPRINTF("[Line: %d][%s] PkgId is %s and WidgetId is %s\\n", __LINE__, API_NAMESPACE, g_szPkgid, g_szWidgetid);
 
                if ( g_loop != NULL )
@@ -159,7 +159,7 @@ static int WidgetInstanceListCB(const char *widget_id, const char *instance_id,
                return -1;
        }
 
-       strcpy(g_szInstanceId,instance_id);
+       strncpy(g_szInstanceId, instance_id, strlen(instance_id)+1);
        FPRINTF("[Line: %d][%s] InstanceId is %s\\n", __LINE__, API_NAMESPACE, g_szInstanceId);
 
        if ( g_loop != NULL )
index 978eb9eeb7bd25e70ff3eb121e922544575fb9ce..20a4827b443438d4b436b78fbe7013e4972dcedc 100755 (executable)
@@ -187,7 +187,7 @@ void wifi_direct_connection_state_changed_callback(int error_code, wifi_direct_c
        g_connection_state = connection_state;
        if ( mac_address != NULL )
        {
-               strcpy(g_szMacAdd, mac_address);
+               strncpy(g_szMacAdd, mac_address, strlen(mac_address)+1);
        }
 
        if ( g_pMainLoop != NULL )
@@ -247,7 +247,7 @@ static bool WifiDirectPersistentGroupCb(const char *mac_address, const char *ssi
                {
                        if ( ssid != NULL )
                        {
-                               strcpy(g_szSSID, ssid);
+                               strncpy(g_szSSID, ssid, strlen(ssid)+1);
                                *((bool *)user_data) = true;    // the one which will be removed is found
                        }
                        return false;