]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[ehci] Do not treat zero-length NULL pointers as unreachable
authorMichael Brown <mcb30@ipxe.org>
Thu, 10 Sep 2015 23:19:16 +0000 (00:19 +0100)
committerMichael Brown <mcb30@ipxe.org>
Sun, 13 Sep 2015 11:54:30 +0000 (12:54 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/usb/ehci.c

index 0a89ec13328733ee6fb3400259926c5ee278c1a9..c2de53a47b9fb79c59bbbe6d7895faab9c49644a 100644 (file)
@@ -603,6 +603,8 @@ static int ehci_enqueue ( struct ehci_device *ehci, struct ehci_ring *ring,
 
        /* Fail if any portion is unreachable */
        for ( i = 0 ; i < count ; i++ ) {
+               if ( ! xfer[i].len )
+                       continue;
                phys = ( virt_to_phys ( xfer[i].data ) + xfer[i].len - 1 );
                if ( ( phys > 0xffffffffUL ) && ( ! ehci->addr64 ) )
                        return -ENOTSUP;