diff options
author | Daniel Gryniewicz <dang@gentoo.org> | 2007-09-21 20:08:54 +0000 |
---|---|---|
committer | Daniel Gryniewicz <dang@gentoo.org> | 2007-09-21 20:08:54 +0000 |
commit | ec909a752d2eedf87b042b76587e112ce551e06e (patch) | |
tree | cf6a3934376b517b3ddbfaf19527856c243d93cf /net-ftp/gftp/files | |
parent | fix #192179, #192218, #192746, #193295, #193354 (diff) | |
download | historical-ec909a752d2eedf87b042b76587e112ce551e06e.tar.gz historical-ec909a752d2eedf87b042b76587e112ce551e06e.tar.bz2 historical-ec909a752d2eedf87b042b76587e112ce551e06e.zip |
Bump to 2.0.18-r6
Fix for issues in bug #188252
Package-Manager: portage-2.1.3.9
Diffstat (limited to 'net-ftp/gftp/files')
-rw-r--r-- | net-ftp/gftp/files/digest-gftp-2.0.18-r6 | 3 | ||||
-rw-r--r-- | net-ftp/gftp/files/gftp-2.0.18-188252.patch | 73 |
2 files changed, 76 insertions, 0 deletions
diff --git a/net-ftp/gftp/files/digest-gftp-2.0.18-r6 b/net-ftp/gftp/files/digest-gftp-2.0.18-r6 new file mode 100644 index 000000000000..a5e7dd4f3967 --- /dev/null +++ b/net-ftp/gftp/files/digest-gftp-2.0.18-r6 @@ -0,0 +1,3 @@ +MD5 44b19442d06f6dc68c7211d66029d826 gftp-2.0.18.tar.bz2 1374850 +RMD160 0e0daea8543ae822b25635647360193362a2648d gftp-2.0.18.tar.bz2 1374850 +SHA256 8145e18d1edf13e8cb6cd7a69bb69de5c46307086997755654488fb8282d38a2 gftp-2.0.18.tar.bz2 1374850 diff --git a/net-ftp/gftp/files/gftp-2.0.18-188252.patch b/net-ftp/gftp/files/gftp-2.0.18-188252.patch new file mode 100644 index 000000000000..760462b60c18 --- /dev/null +++ b/net-ftp/gftp/files/gftp-2.0.18-188252.patch @@ -0,0 +1,73 @@ +diff --exclude-from=/home/dang/.scripts/diffrc -up -bruN gftp-2.0.18.orig/lib/fsplib/fsplib.c gftp-2.0.18/lib/fsplib/fsplib.c +--- gftp-2.0.18.orig/lib/fsplib/fsplib.c 2005-01-18 21:03:45.000000000 -0500 ++++ gftp-2.0.18/lib/fsplib/fsplib.c 2007-09-21 16:03:01.000000000 -0400 +@@ -612,7 +612,7 @@ int fsp_readdir_r(FSP_DIR *dir,struct di + entry->d_reclen = fentry.reclen; + strncpy(entry->d_name,fentry.name,MAXNAMLEN); + +- if (fentry.namlen > MAXNAMLEN) ++ if (fentry.namlen >= MAXNAMLEN) + { + entry->d_name[MAXNAMLEN + 1 ] = '\0'; + #ifdef HAVE_NAMLEN +@@ -680,9 +680,19 @@ int fsp_readdir_native(FSP_DIR *dir,FSP_ + /* skip file date and file size */ + dir->dirpos += 9; + /* read file name */ +- entry->name[255 + 1] = '\0'; ++ entry->name[255] = '\0'; + strncpy(entry->name,(char *)( dir->data + dir->dirpos ),MAXNAMLEN); ++ /* check for ASCIIZ encoded filename */ ++ if (memchr(dir->data + dir->dirpos,0,dir->datasize - dir->dirpos) != NULL) ++ { + namelen = strlen( (char *) dir->data+dir->dirpos); ++ } ++ else ++ { ++ /* \0 terminator not found at end of filename */ ++ *result = NULL; ++ return 0; ++ } + /* skip over file name */ + dir->dirpos += namelen +1; + +@@ -709,12 +719,12 @@ int fsp_readdir_native(FSP_DIR *dir,FSP_ + + struct dirent * fsp_readdir(FSP_DIR *dirp) + { +- static struct dirent entry; ++ static dirent_workaround entry; + struct dirent *result; + + + if (dirp == NULL) return NULL; +- if ( fsp_readdir_r(dirp,&entry,&result) ) ++ if ( fsp_readdir_r(dirp,&entry.dirent,&result) ) + return NULL; + else + return result; +diff --exclude-from=/home/dang/.scripts/diffrc -up -bruN gftp-2.0.18.orig/lib/fsplib/fsplib.h gftp-2.0.18/lib/fsplib/fsplib.h +--- gftp-2.0.18.orig/lib/fsplib/fsplib.h 2005-01-18 21:04:02.000000000 -0500 ++++ gftp-2.0.18/lib/fsplib/fsplib.h 2007-09-21 15:56:37.000000000 -0400 +@@ -1,6 +1,8 @@ + #ifndef _FSPLIB_H + #define _FSPLIB_H 1 + #include <time.h> ++#include <stddef.h> ++ + /* The FSP v2 protocol support library - public interface */ + + /* +@@ -138,6 +140,12 @@ typedef struct FSP_FILE { + unsigned int pos; /* position of next packet */ + } FSP_FILE; + ++ ++typedef union dirent_workaround { ++ struct dirent dirent; ++ char fill[offsetof (struct dirent, d_name) + MAXNAMLEN + 1]; ++} dirent_workaround; ++ + /* function prototypes */ + + /* session management */ |