URL:
  <http://savannah.gnu.org/bugs/?33426>

                 Summary: possible null pointer dereference in ohci.c
                 Project: GNU GRUB
            Submitted by: dvolgyes
            Submitted on: Sun 29 May 2011 08:50:59 AM GMT
                Category: None
                Severity: Major
                Priority: 5 - Normal
              Item Group: Software Error
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 
                 Release: Bazaar - trunk
         Reproducibility: None
         Planned Release: None

    _______________________________________________________

Details:

There is a check in the code, but I think the condition must cover all the
following lines not just the first one:

Original:
   if (o)
     grub_dma_free (o->td_chunk);
     grub_dma_free (o->ed_bulk_chunk);
     grub_dma_free (o->ed_ctrl_chunk);
     grub_dma_free (o->hcca_chunk);
   grub_free (o);

My version:
   if (o)
     {
       grub_dma_free (o->td_chunk);
       grub_dma_free (o->ed_bulk_chunk);
       grub_dma_free (o->ed_ctrl_chunk);
       grub_dma_free (o->hcca_chunk);
       grub_free (o);
      }

Patch is submitted.

(Bug was found by cppcheck 1.47.)




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sun 29 May 2011 08:50:59 AM GMT  Name: ohci.patch  Size: 665B   By:
dvolgyes

<http://savannah.gnu.org/bugs/download.php?file_id=23465>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?33426>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/


_______________________________________________
Bug-grub mailing list
Bug-grub@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-grub

Reply via email to