bugfix: prevent out of bounds write in e_intl_locale_parts_get()

CIDs 1039848, 1039847
This commit is contained in:
Mike Blumenkrantz 2014-03-13 10:46:28 -04:00
parent cc8eb78352
commit 5f68ea5c8d
1 changed files with 2 additions and 2 deletions

View File

@ -687,14 +687,14 @@ e_intl_locale_parts_get(const char *locale)
codeset[tmp_idx] = 0;
tmp_idx = 0;
}
else if (tmp_idx < 32)
else if (tmp_idx < 31)
codeset[tmp_idx++] = locale_char;
else
return NULL;
break;
case 3: /* Gathering modifier */
if (tmp_idx < 32)
if (tmp_idx < 31)
modifier[tmp_idx++] = locale_char;
else
return NULL;