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 02 Jun 2008 09:22:12 PM UTC  
 
Category: BugSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Assigned to: NoneOpen/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Tue 05 Aug 2008 10:05:34 PM UTC, 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 02 Jun 2008 09:22:12 PM UTC, 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 pm215 (Submitted the item)
  •  

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

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 29 Dec 2008 10:44:44 PM UTCpm215CategoryNone=>Bug

    Back to the top


    Powered by Savane 3.1-cleanup