]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
uhci: Fix null pointer dereference.
authorVladimir Serbinenko <phcoder@gmail.com>
Sat, 24 Jan 2015 19:38:12 +0000 (20:38 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Sat, 24 Jan 2015 19:38:12 +0000 (20:38 +0100)
Found by: Coverity scan.

grub-core/bus/usb/uhci.c

index a95fdfe077b8e819d328790ba0e281eebd0d624e..7c5811fd643383db24273cf3f724ff6d39360219 100644 (file)
@@ -625,9 +625,7 @@ grub_uhci_check_transfer (grub_usb_controller_t dev,
       return GRUB_USB_ERR_NONE;
     }
 
-  grub_dprintf ("uhci", "t status=0x%02x\n", errtd->ctrl_status);
-
-  if (!(errtd->ctrl_status & (1 << 23)))
+  if (errtd && !(errtd->ctrl_status & (1 << 23)))
     {
       grub_usb_err_t err = GRUB_USB_ERR_NONE;