Files
zoo/zoo-security_pathsize.patch
OBS User autobuild dbd645c28c Accepting request 25077 from Archiving
Copy from Archiving/zoo based on submit request 25077 from user msmeissn

OBS-URL: https://build.opensuse.org/request/show/25077
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/zoo?expand=0&rev=7
2009-11-27 15:07:57 +00:00

24 lines
746 B
Diff

Index: misc.c
===================================================================
--- misc.c.orig 1991-07-11 21:07:26.000000000 +0200
+++ misc.c 2009-11-24 19:46:09.525623000 +0100
@@ -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);
}