From 252198488c727aab2d859f57ca50be20e8af5e2f Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Fri, 9 Oct 2015 09:26:45 +0100 Subject: [PATCH] Intl: fix potential stack buffer overflow. CID 1298051 @fix --- src/bin/e_intl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/e_intl.c b/src/bin/e_intl.c index 24f98f345..2a6e215d7 100644 --- a/src/bin/e_intl.c +++ b/src/bin/e_intl.c @@ -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);