Article delegate-en/4678 of [1-5116] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:]  
Re: Vstr overflow in Dg 9.9.5 sftp.c
Fri, 27 Nov 2009     Yutaka Sato

Hi,

In message  on 11/26/09(21:08:55)
you Vijay Pandit wrote:
 |I am running Delegate 9.9.5 on Slackware as a FTP to SFTP gateway (reverse proxy for SFTP
 |server).The SFTP server directory has a large number of text files (about 16000)
, each around 15Kb. The FTP client in this case gets a empty directory listing, and
 I see a very large number of  error log messages with the below 
 |
 |VStr overflow in Xstrcpy (9.9.5:sftp.c:164)
 |
 |However, when the directory has smaller number of files, the listing is OK

Hmm... It seems caused by timeout of 3 seconds.
I'll modify it as the following patch (in 9.9.6-pre8 or 9.9.6)

Cheers,
Yutaka
--
  9 9   Yutaka Sato http://delegate.org/y.sato/
 ( ~ )  National Institute of Advanced Industrial Science and Technology
_<   >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan
Do the more with the less -- B. Fuller

*** dist/src/delegate9.9.6-pre7/src/sftp.c	Fri Oct 16 12:50:48 2009
--- ./src/sftp.c	Fri Nov 27 08:50:48 2009
***************
*** 85,90 ****
--- 85,95 ----
  	int tout;
  	FILE *tc;
  
+ 	double St = Time();
+ 	fPollIn(fs,60*1000);
+ 	if( 3 < Time()-St ){
+ 		sv1log("--SFTP relay_list(%s) slow (%.1f)\n",scom,Time()-St);
+ 	}
  	tout = 3*1000;
  	tc = fdopen(dsock,"w");
  	for(;;){
  search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V