Loading...
--- xnu/xnu-3248.50.21/iokit/Kernel/IOBufferMemoryDescriptor.cpp
+++ xnu/xnu-3789.1.32/iokit/Kernel/IOBufferMemoryDescriptor.cpp
@@ -626,6 +626,9 @@
IOBufferMemoryDescriptor::getBytesNoCopy(vm_size_t start, vm_size_t withLength)
{
IOVirtualAddress address;
+
+ if ((start + withLength) < start) return 0;
+
if (kIOMemoryTypePhysical64 == (_flags & kIOMemoryTypeMask))
address = (IOVirtualAddress) _buffer;
else