bugThe nmh Mail Handling System - Bugs: bug #23465, annosbr.c might leak a FILE*

 
 

bug #23465: annosbr.c might leak a FILE*

Submitted by:  Peter Maydell <pm215>
Submitted on:  Mon Jun 2 21:22:12 2008  
 
Category: BugSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Assigned to: Ralph Corderoy <ralph>Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon Oct 17 22:56:11 2016, comment #2:

Fix attempted in bca60df6fa13f9418daf3b5442704ad1abf6018a

Ralph Corderoy <ralph>
Project MemberIn charge of this item.
Tue Aug 5 22:05:34 2008, comment #1:

On closer inspection, that we're doing the fclose() there at all is a bit bogus, as the FILE* has been fdopen()ed from an fd obtained via lkopen. Probably we should be using the lkfopen function instead. Also, annosbr() is very confusing code and could probably benefit from cleaning up. I don't much like the mix of FILE* and fd access either.

Peter Maydell <pm215>
Project Administrator
Mon Jun 2 21:22:12 2008, original submission:

In annosbr.c:annosbr(), most operations on the FILE* fp (including fdopen of it) are inside "if (delete >= -1 || append != 0)". However, the final fclose() is only inside "if (delete >= -1)". This is suspicious, so I'm filing this bug to remind me to look more closely at this later and find out whether it's wrong or not.

Peter Maydell <pm215>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Oct 17 22:56:11 2016ralphAssigned toNone=>ralph
      Open/ClosedOpen=>Closed
    Mon Dec 29 22:44:44 2008pm215CategoryNone=>Bug

    Back to the top


    Powered by Savane 3.1-cleanup