cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[ curl-Bugs-3544688 ] crash during retry with libcurl and SFTP

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Mon, 16 Jul 2012 10:54:49 -0700

Bugs item #3544688, was opened at 2012-07-16 10:54
Message generated for change (Tracker Item Submitted) made by
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3544688&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: SCP/SFTP
Group: crash
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: https://www.google.com/accounts ()
Assigned to: Daniel Stenberg (bagder)
Summary: crash during retry with libcurl and SFTP

Initial Comment:
We ran into a crash with libcurl where the branch at the following line is taken, after the check for writebytecount for http

https://github.com/bagder/curl/blob/master/lib/transfer.c line 2059

Following stacktrace was reached, which caused a crash. I believe it's due to the lack of a protocol check before doing the writebytecount

#0 0x0000003ddd761c31 in fseek () from /lib64/tls/libc.so.6
#1 0x00000000010d704a in Curl_readrewind (conn=Variable "conn" is not available.) at transfer.c:308
#2 0x00000000010d8cac in Curl_retry_request (conn=0x2aa0f27740, url=0x40f1c680) at transfer.c:2104
#3 0x00000000010d9103 in Curl_do_perform (data=0x2aa88e5e30) at transfer.c:2156

Note that at this point, protocol is SFTP, not HTTP

See attached patch for proposed fix.

Curllib version 7.21.6, but I think latest has it as well.

Thanks.

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

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3544688&group_id=976
Received on 2012-07-16

These mail archives are generated by hypermail.

donate! Page updated January 05, 2012.
web site info

File upload with ASP.NET