forked from enlightenment/efl
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:
parent
190cf14959
commit
f4164bbcb8
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue