Fix bugs: Covertiy issue (1124783, 1124713) 16/225316/2 accepted/tizen/unified/20200220.050641 submit/tizen/20200220.003016
authorHyunjee Kim <hj0426.kim@samsung.com>
Wed, 19 Feb 2020 04:49:30 +0000 (13:49 +0900)
committerHyunjee Kim <hj0426.kim@samsung.com>
Wed, 19 Feb 2020 04:44:42 +0000 (04:44 +0000)
Change-Id: Iab720a230dd25ec75a2b8bad16f25975af3d1541
Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
src/utils_i18n_uscript.c

index feb3532..31542b0 100644 (file)
@@ -82,7 +82,7 @@ int i18n_uscript_get_script_extensions(i18n_uchar32 codepoint, i18n_uscript_code
        i18n_error_code_e i18n_error;
        UErrorCode icu_error = U_ZERO_ERROR;
 
-       length = uscript_getScriptExtensions(codepoint, (UScriptCode*)scripts, capacity, &icu_error);
+       *length = uscript_getScriptExtensions(codepoint, (UScriptCode*)scripts, capacity, &icu_error);
        ERR_MAPPING(icu_error, i18n_error);
        I18N_ERR(i18n_error);
 
@@ -96,7 +96,7 @@ int i18n_uscript_get_sample_string(i18n_uscript_code_e script, i18n_uchar *sampl
        i18n_error_code_e i18n_error;
        UErrorCode icu_error = U_ZERO_ERROR;
 
-       length = uscript_getSampleString(script, sample, capacity, &icu_error);
+       *length = uscript_getSampleString(script, sample, capacity, &icu_error);
        ERR_MAPPING(icu_error, i18n_error);
        I18N_ERR(i18n_error);