if( ((numElements == capacity) && capacityIncrement)
|| (!elements)) {
- newCapacity = capacity + capacityIncrement;
+ if (os_add_overflow(capacity, capacityIncrement, &newCapacity))
+ return( false );
newElements = IONew( IORangeAllocatorElement, newCapacity );
if( !newElements)
return( false );