diff --git a/srcpkgs/fastjar/patches/0001-Properly-zero-terminate-filename.patch b/srcpkgs/fastjar/patches/0001-Properly-zero-terminate-filename.patch new file mode 100644 index 00000000000..f1dcb7192dd --- /dev/null +++ b/srcpkgs/fastjar/patches/0001-Properly-zero-terminate-filename.patch @@ -0,0 +1,16 @@ +http://cvs.savannah.gnu.org/viewvc/fastjar/jartool.c?root=fastjar&r1=1.59&r2=1.60&view=patch + +2010-03-01 Richard Guenther + + * jartool.c (read_entries): Properly zero-terminate filename. + +--- jartool.c 2009/09/06 22:16:00 1.59 ++++ jartool.c 2010/03/01 15:38:43 1.60 +@@ -790,6 +790,7 @@ + progname, jarfile); + return 1; + } ++ ze->filename[len] = '\0'; + len = UNPACK_UB4(header, CEN_EFLEN); + len += UNPACK_UB4(header, CEN_COMLEN); + if (lseek (fd, len, SEEK_CUR) == -1) diff --git a/srcpkgs/fastjar/patches/0002-Fix-write-return-value-check.patch b/srcpkgs/fastjar/patches/0002-Fix-write-return-value-check.patch new file mode 100644 index 00000000000..aa1607fd00a --- /dev/null +++ b/srcpkgs/fastjar/patches/0002-Fix-write-return-value-check.patch @@ -0,0 +1,17 @@ +http://cvs.savannah.gnu.org/viewvc/fastjar/jartool.c?root=fastjar&r1=1.60&r2=1.61&view=patch + +2010-06-10 Chris Ball + + * jartool.c (add_file_to_jar): Fix write return value check. + +--- jartool.c 2010/03/01 15:38:43 1.60 ++++ jartool.c 2010/06/10 08:46:10 1.61 +@@ -1258,7 +1258,7 @@ + exit_on_error("write"); + + /* write the file name to the zip file */ +- if (1 == write(jfd, fname, file_name_length)) ++ if (-1 == write(jfd, fname, file_name_length)) + exit_on_error("write"); + + if(verbose){ diff --git a/srcpkgs/fastjar/template b/srcpkgs/fastjar/template new file mode 100644 index 00000000000..ae4e1a26413 --- /dev/null +++ b/srcpkgs/fastjar/template @@ -0,0 +1,12 @@ +# Template file for 'fastjar' +pkgname=fastjar +version=0.98 +revision=1 +build_style=gnu-configure +makedepends="zlib-devel" +short_desc="C implementation of Oracle's jar utility." +maintainer="Enno Boland " +license="GPL-2" +homepage="http://savannah.nongnu.org/projects/fastjar" +distfiles="http://download.savannah.gnu.org/releases/$pkgname/$pkgname-$version.tar.gz" +checksum=f156abc5de8658f22ee8f08d7a72c88f9409ebd8c7933e9466b0842afeb2f145