ICU-7083 incorporate review comments.
X-SVN-Rev: 30060
This commit is contained in:
parent
cf26986c13
commit
6396036807
@ -98,8 +98,12 @@ RuleBasedBreakIterator::RuleBasedBreakIterator(const uint8_t *compiledRules,
|
||||
if (U_FAILURE(status)) {
|
||||
return;
|
||||
}
|
||||
if (compiledRules == NULL || ruleLength < sizeof(RBBIDataHeader)) {
|
||||
status = U_ILLEGAL_ARGUMENT_ERROR;
|
||||
return;
|
||||
}
|
||||
const RBBIDataHeader *data = (const RBBIDataHeader *)compiledRules;
|
||||
if (data->fLength != ruleLength) {
|
||||
if (data->fLength > ruleLength) {
|
||||
status = U_ILLEGAL_ARGUMENT_ERROR;
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user