cURL / Mailing Lists / curl-library / Single Mail

curl-library

Possible bug during retry with libcurl and SFTP

From: Nasron Cheong <nasron.cheong_at_interfaceware.com>
Date: Wed, 11 Jul 2012 17:27:24 -0400

Hi,

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

We are using SFTP, this error does not occur all the time. It's odd to take the branch since the protocol isn't http, its SFTP. In the function there seems to be a protocol check, but only if its an upload operation, which may be causing the issue.

We are reusing the curl context a lot, and there is a possibility that the proto isn't nulled during some operation when Curl_retry_request is being called. Looking through the codebase it looks like it's only nulled when the ssh connection is disconnected.

Thanks.

Nasron Cheong
Development Manager, Toronto Office
iNTERFACEWARE Inc.

T: 1-888-824-6785
F: 1-866-422-0962
W: www.interfaceware.com
_________________________________________________________

VISIT OUR BLOG FOR NEWS, TIPS & MORE: http://blog.interfaceware.com
_________________________________________________________

This message is confidential and is intended only for the addressee. If you are not the intended recipient please notify the sender immediately. You may not copy, forward or disclose the information contained in this message to any third person without our permission. Any information contained in this message that does not relate to the official business of iNTERFACEWARE shall be deemed to be neither endorsed nor approved by iNTERFACEWARE.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-07-11