projects
/
platform
/
core
/
api
/
base-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6abe82e
)
Add exceptions for ucnv
17/233217/2
submit/tizen/20200526.022229
author
Hyunjee Kim
<hj0426.kim@samsung.com>
Wed, 13 May 2020 05:49:26 +0000
(14:49 +0900)
committer
Hyunjee Kim
<hj0426.kim@samsung.com>
Thu, 14 May 2020 08:11:02 +0000
(17:11 +0900)
Change-Id: Ibccb65be6b942081f85f2cbccd33a13223fc3858
Signed-off-by: Hyunjee Kim <hj0426.kim@samsung.com>
src/utils_i18n_ucnv.c
patch
|
blob
|
history
diff --git
a/src/utils_i18n_ucnv.c
b/src/utils_i18n_ucnv.c
index
533ad86
..
78ec66e
100644
(file)
--- a/
src/utils_i18n_ucnv.c
+++ b/
src/utils_i18n_ucnv.c
@@
-21,6
+21,12
@@
int i18n_ucnv_get_max_bytes_for_string(int32_t length, int32_t max_char_size)
{
+ if(length < 0 || max_char_size < 0) {
+ set_last_result(I18N_ERROR_INVALID_PARAMETER);
+ return -1;
+ }
+
+ set_last_result(I18N_ERROR_NONE);
return ((int32_t)(length)+10)*(int32_t)(max_char_size);
}