Update 0.94 to 0.98
This commit is contained in:
parent
55b889585a
commit
4839376e13
4 changed files with 36 additions and 28 deletions
|
@ -1,17 +1,20 @@
|
|||
# $NetBSD: Makefile,v 1.2 2014/12/05 08:15:12 obache Exp $
|
||||
# $NetBSD: Makefile,v 1.3 2014/12/15 09:49:33 makoto Exp $
|
||||
#
|
||||
|
||||
DISTNAME= fastjar-0.94
|
||||
DISTNAME= fastjar-0.98
|
||||
CATEGORIES= archivers
|
||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=fastjar/}
|
||||
MASTER_SITES+= http://download.savannah.gnu.org/releases/fastjar/
|
||||
|
||||
MAINTAINER= pkgsrc-users@NetBSD.org
|
||||
HOMEPAGE= http://fastjar.sourceforge.net/
|
||||
HOMEPAGE= https://savannah.nongnu.org/projects/fastjar
|
||||
COMMENT= C language version of the 'jar' archiver normally used by Java
|
||||
LICENSE= gnu-gpl-v2
|
||||
|
||||
GNU_CONFIGURE= YES
|
||||
|
||||
INFO_FILES= YES
|
||||
INSTALLATION_DIRS= ${PKGMANDIR}/man1
|
||||
|
||||
post-install:
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
@comment $NetBSD: PLIST,v 1.1 2014/11/20 05:36:32 makoto Exp $
|
||||
@comment $NetBSD: PLIST,v 1.2 2014/12/15 09:49:33 makoto Exp $
|
||||
bin/fastjar
|
||||
bin/grepjar
|
||||
info/fastjar.info
|
||||
lib/charset.alias
|
||||
man/man1/fastjar.1
|
||||
man/man1/grepjar.1
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
$NetBSD: distinfo,v 1.3 2014/12/05 08:15:12 obache Exp $
|
||||
$NetBSD: distinfo,v 1.4 2014/12/15 09:49:33 makoto Exp $
|
||||
|
||||
SHA1 (fastjar-0.94.tar.gz) = 2b54b558bed1acef63455b27827b69e83c823f8d
|
||||
RMD160 (fastjar-0.94.tar.gz) = af6b4ea20a07abde3184c49c30f620695525bec0
|
||||
Size (fastjar-0.94.tar.gz) = 77399 bytes
|
||||
SHA1 (fastjar-0.98.tar.gz) = c240a9e2115aad486329360d9166514261149af2
|
||||
RMD160 (fastjar-0.98.tar.gz) = 593ed2dfcc02599a3540028a0f0b5c77d6be7071
|
||||
Size (fastjar-0.98.tar.gz) = 717984 bytes
|
||||
SHA1 (patch-aa) = cdb20f779b32f423a49bcf3a7c64901aef5228c8
|
||||
SHA1 (patch-ab) = da635a3a6ce6c3f3406371e02a376e1d728f8b7e
|
||||
SHA1 (patch-ad) = 6de7af2085dd48f6e324aab8f917503b558b8c31
|
||||
SHA1 (patch-ad) = bdb8f3c1affbcf3cc373f7b5d731b8122eaf4018
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
$NetBSD: patch-ad,v 1.2 2014/12/04 14:51:35 makoto Exp $
|
||||
$NetBSD: patch-ad,v 1.3 2014/12/15 09:49:33 makoto Exp $
|
||||
|
||||
date: 2006-03-14 23:02:01 +0900; author: joerg; state: Exp; lines: +51 -3;
|
||||
Normalise path names as relative under cwd as if they would have been
|
||||
extracted under chroot. Don't attempt to deal with existing symlinks
|
||||
to directories. This prevents directory traversal and therefore the
|
||||
creation of arbitrary files. Bump revision.
|
||||
|
||||
--- jartool.c.orig 2007-02-06 12:32:14.000000000 +0900
|
||||
+++ jartool.c 2014-11-20 14:26:00.000000000 +0900
|
||||
@@ -1152,7 +1150,32 @@ int add_file_to_jar(int jfd, int ffd, ch
|
||||
return 0;
|
||||
}
|
||||
--- jartool.c.orig 2009-09-07 07:10:47.000000000 +0900
|
||||
+++ jartool.c 2014-12-15 18:35:25.000000000 +0900
|
||||
@@ -1512,6 +1512,31 @@ int create_central_header(int fd){
|
||||
return 0;
|
||||
}
|
||||
|
||||
- int extract_jar(int fd, char **files, int file_num){
|
||||
+static void canonical_filename(char *filename)
|
||||
+{
|
||||
+ char *iterator, *iterator2;
|
||||
|
@ -33,21 +37,20 @@ $NetBSD: patch-ad,v 1.2 2014/12/04 14:51:35 makoto Exp $
|
|||
+ }
|
||||
+}
|
||||
+
|
||||
+ int extract_jar(int fd, char **files, int file_num){
|
||||
int rdamt;
|
||||
int out_a, in_a;
|
||||
ub4 signature;
|
||||
@@ -1260,6 +1283,13 @@ int add_file_to_jar(int jfd, int ffd, ch
|
||||
pb_read(&pbf, filename, fnlen);
|
||||
filename[fnlen] = '\0';
|
||||
int extract_jar(int fd, const char **files, int file_num){
|
||||
size_t rdamt;
|
||||
int out_a, in_a;
|
||||
@@ -1628,6 +1653,13 @@ int extract_jar(int fd, const char **fil
|
||||
pb_read(&pbf, filename, fnlen);
|
||||
filename[fnlen] = '\0';
|
||||
|
||||
+ canonical_filename(filename);
|
||||
+ canonical_filename(filename);
|
||||
+
|
||||
+ if (*filename == '\0') {
|
||||
+ fprintf(stderr, "Error extracting JAR archive, empty file name!\n");
|
||||
+ exit(1);
|
||||
+ }
|
||||
+ if (*filename == '\0') {
|
||||
+ fprintf(stderr, "Error extracting JAR archive, empty file name!\n");
|
||||
+ exit(1);
|
||||
+ }
|
||||
+
|
||||
#ifdef DEBUG
|
||||
printf("filename is %s\n", filename);
|
||||
printf("filename is %s\n", filename);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue