#1126 crash during retry with libcurl and SFTP

closed-fixed
SCP/SFTP (19)
5
2013-06-21
2012-07-16
Anonymous
No

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.

Discussion

  • Comment has been marked as spam. 
    Undo

    You can see all pending comments posted by this user  here

    Anonymous - 2012-07-16

    patch file for transfer.c

     
    Last edit: Anonymous 2017-03-17
  • Daniel Stenberg

    Daniel Stenberg - 2012-08-07
    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks