Intl: fix potential stack buffer overflow.

CID 1298051

@fix
This commit is contained in:
Tom Hacohen 2015-10-09 09:26:45 +01:00
parent 981e3f8f31
commit 252198488c
1 changed files with 2 additions and 1 deletions

View File

@ -546,7 +546,8 @@ _e_intl_locale_alias_get(const char *language)
if (!alias_hash) /* No alias file available */
return strdup(language);
strcpy(lower_language, language);
strncpy(lower_language, language, sizeof(lower_language) - 1);
lower_language[sizeof(lower_language) - 1] = '\0';
eina_str_tolower(&lower_language);
alias = eina_hash_find(alias_hash, lower_language);