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-2152270 ] CURLINFO_REDIRECT_URL leaks memory and is incorrect

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Wed, 08 Oct 2008 03:31:33 +0000

Bugs item #2152270, was opened at 2008-10-07 15:01
Message generated for change (Comment added) made by dfandrich
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2152270&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: crash
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: vmpdemo (vmpdemo)
Assigned to: Daniel Stenberg (bagder)
Summary: CURLINFO_REDIRECT_URL leaks memory and is incorrect

Initial Comment:
CURLINFO_REDIRECT_URL leaks memory and is incorrect after the first transfer.

The first transfer is seemingly correct.

Any subsequent transfer with a redirect leaks memory, eventually crashing the process potentially.

Any subsequent transfer WITHOUT a redirect causes the most recent redirect that DID occur on some previous transfer to still be reported.

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

>Comment By: Dan Fandrich (dfandrich)
Date: 2008-10-07 20:31

Message:
I've checked in and disabled test cases 1080 and 1081 that reproduce these
two issues.

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

Comment By: vmpdemo (vmpdemo)
Date: 2008-10-07 15:57

Message:
For the leak just keep accessing in a loop a url which performs a redirect,
while CURLOPT_FOLLOWLOCATION is set to 0. The larger the redirect url, the
faster the leak...

For the incorrect behavior access a url which performs a redirect, while
CURLOPT_FOLLOWLOCATION is set to 0. Then access a url which does not
perform a redirect (CURLOPT_FOLLOWLOCATION no longer matters.) After the
second transfer CURLINFO_REDIRECT_URL will still be set to the value of the
first.

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

Comment By: Daniel Stenberg (bagder)
Date: 2008-10-07 15:44

Message:
do you happen to have a recipe on how to make the bug appear?

I'd like to add a test case for this scenario together with your fix!

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

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2152270&group_id=976
Received on 2008-10-08

These mail archives are generated by hypermail.

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

File upload with ASP.NET