--- misc.c.old 2006-02-23 15:10:26.000000000 -0500 +++ misc.c 2006-02-23 15:10:29.000000000 -0500 @@ -135,11 +135,15 @@ char *fullpath (direntry) struct direntry *direntry; { - static char result[PATHSIZE]; + static char result[PATHSIZE+PATHSIZE+12]; // Room for enough space combine (result, direntry->dirlen != 0 ? direntry->dirname : "", (direntry->namlen != 0) ? direntry->lfname : direntry->fname ); + if (strlen (result) >= PATHSIZE) { + prterror ('f', "Combined dirname and filename too long\n"); + } + return (result); }