ICU-5426 Make sure that any overflow for the new smaller buffer is registered as a failure.

X-SVN-Rev: 20473
This commit is contained in:
George Rhoten 2006-10-02 23:29:09 +00:00
parent 8b00b7daf4
commit b3c7746b16

View file

@ -525,6 +525,11 @@ testTrieRanges(const char *testName,
utrie_close(newTrie);
return;
}
if (length >= (int32_t)sizeof(storageHolder.storage)) {
log_err("error: utrie_serialize(%s) needs more memory\n", testName);
utrie_close(newTrie);
return;
}
/* test linear Latin-1 range from utrie_getData() */
if(latin1Linear) {