Bläddra i källkod

[ehci] Do not treat zero-length NULL pointers as unreachable

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 9 år sedan
förälder
incheckning
6424a38323
1 ändrade filer med 2 tillägg och 0 borttagningar
  1. 2
    0
      src/drivers/usb/ehci.c

+ 2
- 0
src/drivers/usb/ehci.c Visa fil

603
 
603
 
604
 	/* Fail if any portion is unreachable */
604
 	/* Fail if any portion is unreachable */
605
 	for ( i = 0 ; i < count ; i++ ) {
605
 	for ( i = 0 ; i < count ; i++ ) {
606
+		if ( ! xfer[i].len )
607
+			continue;
606
 		phys = ( virt_to_phys ( xfer[i].data ) + xfer[i].len - 1 );
608
 		phys = ( virt_to_phys ( xfer[i].data ) + xfer[i].len - 1 );
607
 		if ( ( phys > 0xffffffffUL ) && ( ! ehci->addr64 ) )
609
 		if ( ( phys > 0xffffffffUL ) && ( ! ehci->addr64 ) )
608
 			return -ENOTSUP;
610
 			return -ENOTSUP;

Laddar…
Avbryt
Spara