mirror of git://sourceware.org/git/glibc.git
Gracefully handle incompatible locale data
* locale/loadlocale.c (_nl_intern_locale_data): Change assertion on CNT to a conditional jump to 'puntdata'.
This commit is contained in:
parent
7a4cb4ad11
commit
0062ace229
|
@ -1,3 +1,8 @@
|
||||||
|
2015-10-27 Ludovic Courtès <ludo@gnu.org>
|
||||||
|
|
||||||
|
* locale/loadlocale.c (_nl_intern_locale_data): Change assertion
|
||||||
|
on CNT to a conditional jump to 'puntdata'.
|
||||||
|
|
||||||
2015-10-27 Joseph Myers <joseph@codesourcery.com>
|
2015-10-27 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
* configure.ac (libc_cv_gcc___thread): Remove configure test.
|
* configure.ac (libc_cv_gcc___thread): Remove configure test.
|
||||||
|
|
|
@ -121,9 +121,10 @@ _nl_intern_locale_data (int category, const void *data, size_t datasize)
|
||||||
switch (category)
|
switch (category)
|
||||||
{
|
{
|
||||||
#define CATTEST(cat) \
|
#define CATTEST(cat) \
|
||||||
case LC_##cat: \
|
case LC_##cat: \
|
||||||
assert (cnt < (sizeof (_nl_value_type_LC_##cat) \
|
if (cnt >= (sizeof (_nl_value_type_LC_##cat) \
|
||||||
/ sizeof (_nl_value_type_LC_##cat[0]))); \
|
/ sizeof (_nl_value_type_LC_##cat[0]))) \
|
||||||
|
goto puntdata; \
|
||||||
break
|
break
|
||||||
CATTEST (NUMERIC);
|
CATTEST (NUMERIC);
|
||||||
CATTEST (TIME);
|
CATTEST (TIME);
|
||||||
|
|
Loading…
Reference in New Issue