2011/9/17 Daniel Stenberg <dan...@haxx.se> There is a little problem: - if(sftp->read_state == libssh2_NB_state_sent) + if(sftp->read_state == libssh2_NB_state_sent && + _libssh2_list_first(&handle->packet_list) != NULL) { + /* If we previously set the read_state to libssh2_NB_state_sent + due to EAGAIN, but the caller canceled subsequent request(by close + handle or seek), then we will get a NULL loop in the next call, + give a judgement here to avoid this. */ goto send_read_requests; + }
See attachment.
0001-avoid-NULL-loop-in-sftp_read.patch
Description: Binary data
_______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel