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:  Bug Severity:  3 - Normal
Priority:  5 - Normal Status:  None
Assigned to:  Ralph Corderoy <ralph> Open/Closed:  Closed

Add a New Comment(Rich 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 Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


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



    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-10-17 ralph Assigned toNone => ralph
        Open/ClosedOpen => Closed
    2008-12-29 pm215 CategoryNone => Bug

    Back to the top

    Powered by Savane 3.3