mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 22:44:49 +00:00
ICU-7083 incorporate review comments.
X-SVN-Rev: 30060
This commit is contained in:
parent
cf26986c13
commit
6396036807
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue