From 7de2483fbd439a635f2004b9f564dc669fd99584 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Wed, 11 Feb 2004 02:48:58 +0000 Subject: [PATCH] Fixed a crash bug when keep_backup() calls make_file() and the lastdir pointer is no longer valid. --- flist.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/flist.c b/flist.c index 94a1b2cb..0906f39f 100644 --- a/flist.c +++ b/flist.c @@ -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) { -- 2.34.1