ICU-7264 check for supported prefix length

X-SVN-Rev: 28787
This commit is contained in:
Markus Scherer 2010-10-11 21:01:31 +00:00
parent adb11cba8d
commit a788c4e44c

View File

@ -995,6 +995,12 @@ struct {
// contractionCEs[1]: '\0' to differentiate with contractions.
// contractionCEs[2]: prefix char
if (element->prefixSize>0) {
if(element->cSize > 1 || element->prefixSize > 1) {
fprintf(stderr,
"\nCharacter with prefix, "
"either too many characters or prefix too long.\n");
exit(*status);
}
if(noOfContractions>=MAX_UCA_CONTRACTION_CES) {
fprintf(stderr,
"\nMore than %d contractions. Please increase MAX_UCA_CONTRACTION_CES in genuca.cpp. "