зеркало из https://github.com/mozilla/gecko-dev.git
Bug 819825, fix ICE/STUN crash on Android by null-checking setlocale(), r=abr
This commit is contained in:
Родитель
1f48f84d13
Коммит
48a25bac31
|
@ -91,9 +91,11 @@ mbslen(const char *s, size_t *ncharsp)
|
|||
if (!strstr(my_locale, "UTF-8"))
|
||||
ABORT(R_NOT_FOUND);
|
||||
#else
|
||||
/* can't count UTF-8 characters with mbrlen if the locale isn't UTF-8 */
|
||||
if (! strcasestr(setlocale(LC_CTYPE, 0), "UTF-8"))
|
||||
ABORT(R_NOT_FOUND);
|
||||
/* can't count UTF-8 characters with mbrlen if the locale isn't UTF-8 */
|
||||
/* null-checking setlocale is required because Android */
|
||||
char *locale = setlocale(LC_CTYPE, 0);
|
||||
if (!locale || !strcasestr(locale, "UTF-8"))
|
||||
ABORT(R_NOT_FOUND);
|
||||
#endif
|
||||
|
||||
#ifdef DARWIN
|
||||
|
|
Загрузка…
Ссылка в новой задаче