diff -up vsftpd-2.0.5/postlogin.c.fix_unique vsftpd-2.0.5/postlogin.c --- vsftpd-2.0.5/postlogin.c.fix_unique 2007-11-30 11:16:10.000000000 +0100 +++ vsftpd-2.0.5/postlogin.c 2007-11-30 11:23:57.000000000 +0100 @@ -1701,6 +1701,12 @@ get_unique_filename(struct mystr* p_outs static struct vsf_sysutil_statbuf* s_p_statbuf; unsigned int suffix = 1; int retval; + retval = str_stat(p_base_str, &s_p_statbuf); + if (vsf_sysutil_retval_is_error(retval)) + { + str_copy(p_outstr, p_base_str); + return; + } while (1) { str_copy(p_outstr, p_base_str);