23 lines
645 B
Text
23 lines
645 B
Text
$NetBSD: patch-ak,v 1.2 2009/04/25 23:46:47 gdt Exp $
|
|
|
|
--- misc.c.orig 1991-07-16 17:52:54.000000000 +0200
|
|
+++ misc.c
|
|
@@ -135,11 +135,17 @@ if available, else the short filename is
|
|
char *fullpath (direntry)
|
|
struct direntry *direntry;
|
|
{
|
|
- static char result[PATHSIZE];
|
|
+ static char result[PATHSIZE+LFNAMESIZE+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");
|
|
+ *result = '\0';
|
|
+ }
|
|
+
|
|
return (result);
|
|
}
|
|
|