468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
|
void *pool = objc_autoreleasePoolPush(), *pool2;
const of_unichar_t *unicodeString;
const of_unichar_t *searchString = [string unicodeString];
size_t searchLength = [string length];
size_t replacementLength = [replacement length];
size_t i;
if (range.location + range.length > [self length])
@throw [OFOutOfRangeException exceptionWithClass: [self class]];
if (searchLength > range.length) {
objc_autoreleasePoolPop(pool);
return;
}
|
>
|
|
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
|
void *pool = objc_autoreleasePoolPush(), *pool2;
const of_unichar_t *unicodeString;
const of_unichar_t *searchString = [string unicodeString];
size_t searchLength = [string length];
size_t replacementLength = [replacement length];
size_t i;
if (range.length > SIZE_MAX - range.location ||
range.location + range.length > [self length])
@throw [OFOutOfRangeException exceptionWithClass: [self class]];
if (searchLength > range.length) {
objc_autoreleasePoolPop(pool);
return;
}
|