marc 98/01/05 13:05:08
Modified: src/modules/proxy Tag: APACHE_1_2_X proxy_ftp.c Log: Fix core dump in the ftp proxy when reading incorrectly formatted directory listings. Reviewed by: Martin Kraemer, Mark J Cox, Dean Gaudet, Randy Terbush Revision Changes Path No revision No revision 1.21.2.2 +2 -2 apache/src/modules/proxy/proxy_ftp.c Index: proxy_ftp.c =================================================================== RCS file: /export/home/cvs/apache/src/modules/proxy/proxy_ftp.c,v retrieving revision 1.21.2.1 retrieving revision 1.21.2.2 diff -u -r1.21.2.1 -r1.21.2.2 --- proxy_ftp.c 1997/08/15 17:08:55 1.21.2.1 +++ proxy_ftp.c 1998/01/05 21:05:07 1.21.2.2 @@ -286,8 +286,8 @@ buf[sizeof(buf)-1] = '\0'; n=strlen(buf); } - else if(buf[0]=='d' || buf[0]=='-' || buf[0]=='l' || isdigit(buf[0])) - { + else if (strrchr(buf, ' ') && (buf[0]=='d' || buf[0]=='-' || + buf[0]=='l' || isdigit(buf[0])) ) { if(isdigit(buf[0])) { /* handle DOS dir */ searchptr = strchr(buf, '<'); if(searchptr != NULL)