- update to 1.14i-ac20050924

Suggested by:	Shigekazu Kimura
This commit is contained in:
Dirk Meyer 2006-08-17 05:12:37 +00:00
parent ed762c27a0
commit 34fccf664b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=170837
5 changed files with 6 additions and 5012 deletions

View File

@ -7,14 +7,14 @@
PORTNAME= lha
PORTVERSION= 1.14i
PORTREVISION= 7
PORTREVISION= 8
CATEGORIES= archivers
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_JP} \
http://qgpop.dl.sourceforge.jp/%SUBDIR%/ \
http://osdn.dl.sourceforge.jp/%SUBDIR%/
MASTER_SITE_SUBDIR= lha/6052
MASTER_SITE_SUBDIR= lha/16650
PKGNAMESUFFIX= -ac${PKGNAMESUFFIX2}
DISTNAME= ${PORTNAME}-${PORTVERSION}-ac20030921
DISTNAME= ${PORTNAME}-${PORTVERSION}-ac20050924
MAINTAINER= dinoex@FreeBSD.org
COMMENT= Archive files using LZSS and Huffman compression (.lzh files)

View File

@ -1,3 +1,3 @@
MD5 (lha-1.14i-ac20030921.tar.gz) = 7cbf0599683547b64f44076def988c55
SHA256 (lha-1.14i-ac20030921.tar.gz) = c81ba351411dd935ec6be0e051dc1558a41d68e0180ae2ae90f06c09c43ed9e1
SIZE (lha-1.14i-ac20030921.tar.gz) = 216238
MD5 (lha-1.14i-ac20050924.tar.gz) = e152850807e524bdac54373e16bac290
SHA256 (lha-1.14i-ac20050924.tar.gz) = 7545974fc024a734c252c9ec457d9dd4ddfa2a14c1f35b700b196fad4a39dd08
SIZE (lha-1.14i-ac20050924.tar.gz) = 275236

File diff suppressed because it is too large Load Diff

View File

@ -1,51 +0,0 @@
--- src/lharc.c.orig Sun Sep 21 15:58:52 2003
+++ src/lharc.c Thu Sep 23 07:22:19 2004
@@ -994,9 +994,10 @@
struct stat tmp_stbuf, arc_stbuf, fil_stbuf;
int exist_tmp = 1, exist_arc = 1;
- strcpy(newname, name);
+ strncpy(newname, name, sizeof(newname));
+ newname[sizeof(newname)-1] = 0;
len = strlen(name);
- if (len > 0 && newname[len - 1] != '/') {
+ if (len > 0 && newname[len - 1] != '/' && len < (sizeof(newname)-1)) {
newname[len++] = '/';
newname[len] = 0;
}
@@ -1014,12 +1015,16 @@
while ((dp = readdir(dirp)) != NULL) {
n = NAMLEN(dp);
+ if (len >= (sizeof(newname)-1)
+ || (len+n) >= (sizeof(newname)-1)
+ || n <= 0
+ || (len+n) <= 0)
+ break;
/* exclude '.' and '..' */
if (strncmp(dp->d_name, ".", n) == 0
|| strncmp(dp->d_name, "..", n) == 0)
continue;
-
/* exclude exclude_files supplied by user */
for (i = 0; exclude_files && exclude_files[i]; i++) {
if (fnmatch(exclude_files[i], dp->d_name,
@@ -1092,10 +1097,16 @@
#else
char *p, *s;
- strcpy(temporary_name, archive_name);
+ strncpy(temporary_name, archive_name, sizeof(temporary_name));
+ temporary_name[sizeof(temporary_name)-1] = 0;
for (p = temporary_name, s = (char *) 0; *p; p++)
if (*p == '/')
s = p;
+
+ if( sizeof(temporary_name) - ((size_t) (s-temporary_name)) - 1
+ <= strlen("lhXXXXXX"))
+ exit(-1);
+
strcpy((s ? s + 1 : temporary_name), "lhXXXXXX");
#endif
#ifdef HAVE_MKSTEMP

View File

@ -1,25 +0,0 @@
--- src/lhext.c.orig Thu Sep 23 09:01:34 2004
+++ src/lhext.c Thu Sep 23 09:01:34 2004
@@ -88,7 +88,8 @@
register char *p;
/* make parent directory name into PATH for recursive call */
- strcpy(path, name);
+ memset(path, 0, sizeof(path));
+ strncpy(path, name, sizeof(path)-1);
for (p = path + strlen(path); p > path; p--)
if (p[-1] == '/') {
*--p = '\0';
@@ -249,8 +250,10 @@
if (extract_directory)
xsnprintf(name, sizeof(name), "%s/%s", extract_directory, q);
- else
- strcpy(name, q);
+ else {
+ strncpy(name, q, sizeof(name));
+ name[sizeof(name) - 1] = '\0';
+ }
/* LZHDIRS_METHODを持つヘッダをチェックする */