Upgrade to 2.5.

This commit is contained in:
Vanilla I. Shu
2006-03-15 06:16:49 +00:00
parent d380d8cedf
commit c7975ea767
4 changed files with 10 additions and 66 deletions

View File

@@ -6,11 +6,11 @@
#
PORTNAME= extract-xiso
DISTVERSION= 2.4b2
DISTVERSION= 2.5
CATEGORIES= emulators
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
DISTNAME= ${PORTNAME}_src_v${DISTVERSION}
DISTNAME= ${PORTNAME}_v${DISTVERSION}_src
EXTRACT_SUFX= .tgz
MAINTAINER= ports@FreeBSD.org

View File

@@ -1,3 +1,3 @@
MD5 (extract-xiso_src_v2.4b2.tgz) = 6d05fa82f89dc8aaf05201ee15658982
SHA256 (extract-xiso_src_v2.4b2.tgz) = f17db639c489d4dc28159aef4a59fc05d42d7ee9837aa7a6cb222e6f4890072b
SIZE (extract-xiso_src_v2.4b2.tgz) = 206700
MD5 (extract-xiso_v2.5_src.tgz) = 1283bb3be0f17bfe511aff86cff0eb76
SHA256 (extract-xiso_v2.5_src.tgz) = 056bae1d970a1907aebebc796724fc82debac72010e8227f9ce5a470f16714d7
SIZE (extract-xiso_v2.5_src.tgz) = 207052

View File

@@ -1,23 +1,11 @@
--- extract-xiso.c.orig Fri Sep 30 15:49:47 2005
+++ extract-xiso.c Fri Sep 30 15:50:29 2005
@@ -215,7 +215,7 @@
#include <sys/types.h>
--- extract-xiso.c.orig Sat Jan 28 09:16:25 2006
+++ extract-xiso.c Sat Mar 4 12:15:59 2006
@@ -236,7 +236,7 @@
#if defined( __FREEBSD__ )
- #include <machine/limits.h>
+ #include <limits.h>
#endif
#if ! defined( NO_FTP )
@@ -1345,6 +1345,11 @@
if ( ! err ) {
if ( read( in_xiso, dir->filename, dir->filename_length ) != dir->filename_length ) read_err();
if ( ! err ) dir->filename[ dir->filename_length ] = 0;
+ if (strstr(dir->filename,"..") || strchr(dir->filename, '/') || strchr(dir->filename, '\\'))
+ {
+ printf("Filename contains invalid characters");
+ exit(1);
+ }
}
if ( ! err && in_mode == k_generate_avl ) {

View File

@@ -1,44 +0,0 @@
--- libftp-5.0.1.modified.by.in/FtpStat.c.orig Fri Sep 30 15:44:08 2005
+++ libftp-5.0.1.modified.by.in/FtpStat.c Fri Sep 30 15:46:43 2005
@@ -84,6 +84,7 @@
register FILE *in;
register FTP_STAT *stat=NULL, *prev=NULL;
register int sys_unix,sys_vms,sys_msdos;
+ int fd;
*first = NULL;
strcpy(syst,FtpSyst(ftp));
@@ -94,22 +95,28 @@
#if ! defined( _WIN32 )
sprintf(tmp,"/tmp/%s.XXXXXX",getpwuid(getuid())->pw_name);
- if ( mktemp( tmp ) == -1 ) return EXIT( ftp, LQUIT );
+ if ( ( fd = mkstemp( tmp ) ) == -1 ) return EXIT( ftp, LQUIT );
+ close( fd );
#else
sprintf( tmp, "extract-xiso.tmp.XXXXXX" );
if ( _mktemp( tmp ) == NULL ) return EXIT( ftp, LQUIT );
#endif
- if ( ( tmp2 = strdup( tmp ) ) == NULL ) { errno = ENOMEM; return EXIT( ftp, LQUIT ); }
+ if ( ( tmp2 = strdup( tmp ) ) == NULL ) {
+ errno = ENOMEM;
+ unlink( tmp );
+ return EXIT( ftp, LQUIT );
+ }
if (*patern==0)
FtpRetr(ftp,"LIST","",tmp);
else
FtpRetr(ftp,sys_unix?"LIST -d %s":"LIST %s",patern,tmp);
- if ( (in=fopen(tmp,"r")) == NULL)
- return EXIT(ftp,LQUIT);
-
+ if ( (in=fopen(tmp,"r")) == NULL) {
+ unlink( tmp );
+ return EXIT(ftp,LQUIT);
+ }
while(1)
{