Commit 7de2483f authored by Wayne Davison's avatar Wayne Davison

Fixed a crash bug when keep_backup() calls make_file() and the lastdir

pointer is no longer valid.
parent 65d6212d
......@@ -731,6 +731,8 @@ struct file_struct *make_file(char *fname,
char *basename, *dirname, *bp;
unsigned short flags = 0;
if (!flist) /* lastdir isn't valid if flist is NULL */
lastdir_len = -1;
if (strlcpy(thisname, fname, sizeof thisname)
>= sizeof thisname - flist_dir_len) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment