bugGNU GRUB - Bugs: bug #33427, several cppcheck error

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #33427: several cppcheck error

Submitted by:  David Volgyes <dvolgyes>
Submitted on:  Sun 29 May 2011 09:16:13 AM UTC  
 
Category: NoneSeverity: Major
Priority: 5 - NormalItem Group: Software Error
Status: FixedPrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: ClosedRelease: 
Release: Bazaar - trunkReproducibility: None
Planned Release: None

Thu 23 Jun 2011 08:22:37 PM UTC, comment #1:

We don't modify gnulib files. We pull them as-is from gnulib.
Define warnings are irrelevant.
Real problems fixed. Thanks.

Vladimir Serbinenko <phcoder>
Project Administrator
Sun 29 May 2011 09:16:13 AM UTC, original submission:

[grub-1.99~rc2/grub-core/gnulib/regcomp.c:2797]: (error) Uninitialized variable: symb_table

Probably, symb_table should be initialized always.
A possibly fix is submitted. (regcomp.patch)

[grub-1.99~rc2/util/grub-mkpasswd-pbkdf2.c:273]: (error) Deallocating a deallocated pointer: f

Several fclose(f) were, but there were bad.
(closing NULL or already closed "f", etc.)
Patch is submitted. (grub-mkpasswd-pbkdf2.patch)

[grub-1.99~rc2/util/grub-setup.c:375]: (error) GRUB_MACHINE_PCBIOS is already guaranteed to be defined

A patch is submitted. (grub-setup.patch)

[grub-1.99~rc2/util/ieee1275/ofpath.c:300]: (error) Resource leak: fd
fd must be closed. A patch is submitted. (ofpath.patch)

[grub-1.99~rc2/util/ieee1275/ofpath.c:423]: (error) Memory leak: of_path

of_path should be freed. A patch is submitted. (ofpath.patch)

[grub-1.99~rc2/util/ieee1275/ofpath.c:376]: (error) Memory leak: name_buf

This is unclear. I think it is worth to check it, but I have no patch for this.

The bugs above were found with cppcheck 1.47.

David Volgyes <dvolgyes>

 

Attached Files
file #23467:  grub-setup.patch added by dvolgyes (616B - text/x-patch)
file #23468:  regcomp.patch added by dvolgyes (637B - text/x-patch)
file #23469:  ofpath.patch added by dvolgyes (465B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by phcoder (Posted a comment)
  • -unavailable- added by dvolgyes (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 23 Jun 2011 08:22:37 PM UTCphcoderStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sun 29 May 2011 09:16:13 AM UTCdvolgyesAttached File-=>Added grub-mkpasswd-pbkdf2.patch, #23466
      Attached File-=>Added grub-setup.patch, #23467
      Attached File-=>Added regcomp.patch, #23468
      Attached File-=>Added ofpath.patch, #23469

    Back to the top


    Powered by Savane 3.1-cleanup1