edje_util: Prevent null pointer access

Summary: locale can be null. so add null check.

Test Plan: N/A

Reviewers: Hermet, kimcinoo, herb

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11490
This commit is contained in:
junsu choi 2020-03-12 14:43:37 +09:00 committed by Hermet Park
parent 190cf14959
commit f4164bbcb8
1 changed files with 1 additions and 0 deletions

View File

@ -326,6 +326,7 @@ edje_language_set(const char *locale)
char *loc;
int length;
if (!locale) return;
lookup = strstr(locale, ".");
length = lookup ? lookup - locale : (int)strlen(locale);
loc = alloca(length + 1);