ICU-2809 gracefully exit when table has more than 64K stuff
X-SVN-Rev: 11883
This commit is contained in:
parent
231b11fb9b
commit
a083516404
@ -499,13 +499,14 @@ parseString(char *tag, uint32_t startline, UErrorCode *status)
|
||||
doesn't survive expect either) */
|
||||
|
||||
result = string_open(bundle, tag, tokenValue->fChars, tokenValue->fLength, status);
|
||||
if(U_SUCCESS(*status) && result) {
|
||||
expect(TOK_CLOSE_BRACE, NULL, NULL, status);
|
||||
|
||||
expect(TOK_CLOSE_BRACE, NULL, NULL, status);
|
||||
|
||||
if (U_FAILURE(*status))
|
||||
{
|
||||
string_close(result, status);
|
||||
return NULL;
|
||||
if (U_FAILURE(*status))
|
||||
{
|
||||
string_close(result, status);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1535,8 +1536,6 @@ parse(UCHARBUF *buf, const char *currentInputDir, UErrorCode *status)
|
||||
|
||||
if (U_FAILURE(*status))
|
||||
{
|
||||
/* realParseTable has already closed the table */
|
||||
bundle->fRoot = NULL;
|
||||
bundle_close(bundle, status);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -916,7 +916,7 @@ uint16_t bundle_addtag(struct SRBRoot *bundle, const char *tag, UErrorCode *stat
|
||||
return (uint16_t) - 1;
|
||||
}
|
||||
|
||||
keypos = bundle->fKeyPoint;
|
||||
keypos = (uint16_t)bundle->fKeyPoint;
|
||||
|
||||
bundle->fKeyPoint += (uint16_t) (uprv_strlen(tag) + 1);
|
||||
|
||||
|
@ -34,7 +34,7 @@ U_CDECL_BEGIN
|
||||
/* Resource bundle root table */
|
||||
struct SRBRoot {
|
||||
char *fLocale;
|
||||
uint16_t fKeyPoint;
|
||||
uint32_t fKeyPoint;
|
||||
char *fKeys;
|
||||
int32_t fCount;
|
||||
struct SResource *fRoot;
|
||||
|
Loading…
Reference in New Issue
Block a user