ICU-6132 Add null pointer check to regexcmp.cpp
X-SVN-Rev: 23234
This commit is contained in:
parent
eb21e23b10
commit
82033615bf
@ -307,6 +307,11 @@ void RegexCompile::compile(
|
||||
//
|
||||
int32_t numSets = fRXPat->fSets->size();
|
||||
fRXPat->fSets8 = new Regex8BitSet[numSets];
|
||||
// Null pointer check.
|
||||
if (fRXPat->fSets8 == NULL) {
|
||||
e = *fStatus = U_MEMORY_ALLOCATION_ERROR;
|
||||
return;
|
||||
}
|
||||
int32_t i;
|
||||
for (i=0; i<numSets; i++) {
|
||||
UnicodeSet *s = (UnicodeSet *)fRXPat->fSets->elementAt(i);
|
||||
|
Loading…
Reference in New Issue
Block a user