From: Michael Brown Date: Thu, 10 Sep 2015 23:19:16 +0000 (+0100) Subject: [ehci] Do not treat zero-length NULL pointers as unreachable X-Git-Tag: v1.20.1~697 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6424a383231d622245514ce9d4f716a6aa607ac0;p=thirdparty%2Fipxe.git [ehci] Do not treat zero-length NULL pointers as unreachable Signed-off-by: Michael Brown --- diff --git a/src/drivers/usb/ehci.c b/src/drivers/usb/ehci.c index 0a89ec133..c2de53a47 100644 --- a/src/drivers/usb/ehci.c +++ b/src/drivers/usb/ehci.c @@ -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;