mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 19:00:07 +00:00
(__gconv_lookup_cache): Catch one more boundary case and reject it.
This commit is contained in:
parent
73de87b622
commit
ee6a43e5f0
@ -324,11 +324,12 @@ __gconv_lookup_cache (const char *toset, const char *fromset,
|
||||
try_internal:
|
||||
/* See whether we can convert via the INTERNAL charset. */
|
||||
if ((fromidx != 0 && __builtin_expect (from_module->fromname_offset, 1) == 0)
|
||||
|| (toidx != 0 && __builtin_expect (to_module->toname_offset, 1) == 0))
|
||||
|| (toidx != 0 && __builtin_expect (to_module->toname_offset, 1) == 0)
|
||||
|| (fromidx == 0 && toidx == 0))
|
||||
/* Not possible. Nothing we can do. */
|
||||
return __GCONV_NOCONV;
|
||||
|
||||
/* Use the two modules. */
|
||||
/* We will use up to two modules. Always allocate room for two. */
|
||||
result = (struct __gconv_step *) malloc (2 * sizeof (struct __gconv_step));
|
||||
if (result == NULL)
|
||||
return __GCONV_NOMEM;
|
||||
|
Loading…
Reference in New Issue
Block a user