cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-2796358 ] cookie.c may leak memory

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Mon, 25 May 2009 12:25:48 +0000

Bugs item #2796358, was opened at 2009-05-25 11:54
Message generated for change (Comment added) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2796358&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: libcurl
Group: bad behaviour
Status: Open
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: T. Manske (qwertz12345)
Assigned to: Daniel Stenberg (bagder)
Summary: cookie.c may leak memory

Initial Comment:
version 7.19.5, 7.19.4

Valgrind hinted me to memory leaks in lib/cookie.c with my application.
The appended patch stuffed them for me.

----------------------------------------------------------------------

>Comment By: Daniel Stenberg (bagder)
Date: 2009-05-25 14:25

Message:
Thanks, I did that and committed this fix just now. If you tell me your
full name I'll give you the proper credit for this find in the changelog
etc.

----------------------------------------------------------------------

Comment By: T. Manske (qwertz12345)
Date: 2009-05-25 13:12

Message:
Thanks, this helps as well.
I suggest changing the type of the second argument of strstore() to const
char * to get rid of those compiler warnings.

----------------------------------------------------------------------

Comment By: T. Manske (qwertz12345)
Date: 2009-05-25 12:20

Message:
Well, the cookies are set manually so they may not be well formed. Ii.e.
they come from javascript, not http, so they may not be well formed. My
application just passes them to libcurl without validation. Indeed there
are sometimes doubled path and/or domain parts in them.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2009-05-25 12:10

Message:
Assuming that was the case, can you give me your opinion on my suggested
fix for this as I just attached here?

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2009-05-25 11:57

Message:
oh, do you by any chance receive cookies with multiple domain and path
properties? Or how did you end up with a leak for these?

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2796358&group_id=976
Received on 2009-05-25

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET