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: 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 17 Oct 2016 10:56:11 PM UTC, comment #2:

Fix attempted in bca60df6fa13f9418daf3b5442704ad1abf6018a

Ralph Corderoy <ralph>
Project MemberIn charge of this item.
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):

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 17 Oct 2016 10:56:11 PM UTCralphAssigned toNone=>ralph
    Mon 29 Dec 2008 10:44:44 PM UTCpm215CategoryNone=>Bug

    Back to the top

    Powered by Savane 3.1-cleanup