From 9740fe37a0fca18b09a046bc0942870a8d95d837 Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 09:01:41 +0000 Subject: [PATCH] =?UTF-8?q?auto-import=20changelog=20data=20from=20ncompre?= =?UTF-8?q?ss-4.2.4-28.src.rpm=20Wed=20Feb=2027=202002=20Trond=20Eivind=20?= =?UTF-8?q?Glomsr=F8d=20=204.2.4-28=20-=20Rebuild=20Wed=20?= =?UTF-8?q?Jan=2009=202002=20Tim=20Powers=20=20-=20automa?= =?UTF-8?q?ted=20rebuild=20Mon=20Nov=2026=202001=20Trond=20Eivind=20Glomsr?= =?UTF-8?q?=F8d=20=204.2.4-26=20-=20Rebuild,=20to=20fix=20?= =?UTF-8?q?problem=20with=20broken=20man=20page=20(#56654)=20Wed=20Nov=202?= =?UTF-8?q?1=202001=20Trond=20Eivind=20Glomsr=F8d=20=204.2?= =?UTF-8?q?.4-25=20-=20Exit,=20don't=20segfault,=20when=20given=20too=20lo?= =?UTF-8?q?ng=20filenames?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ncompress-4.2.4-filenamelen.patch | 98 +++++++++++++++++++++++++++++++ ncompress.spec | 19 +++++- 2 files changed, 115 insertions(+), 2 deletions(-) create mode 100644 ncompress-4.2.4-filenamelen.patch diff --git a/ncompress-4.2.4-filenamelen.patch b/ncompress-4.2.4-filenamelen.patch new file mode 100644 index 0000000..67676c7 --- /dev/null +++ b/ncompress-4.2.4-filenamelen.patch @@ -0,0 +1,98 @@ +--- ncompress-4.2.4/compress42.c.filenamelen Wed Nov 21 12:19:38 2001 ++++ ncompress-4.2.4/compress42.c Wed Nov 21 12:20:03 2001 +@@ -140,6 +140,7 @@ + #include + #include + #include ++#include + + #ifdef DIRENT + # include +@@ -213,7 +214,7 @@ + # define OBUFSIZ BUFSIZ /* Default output buffer size */ + #endif + +-#define MAXPATHLEN 1024 /* MAXPATHLEN - maximum length of a pathname we allow */ ++#define MAXPATHLEN PATH_MAX /* MAXPATHLEN - maximum length of a pathname we allow */ + #define SIZE_INNER_LOOP 256 /* Size of the inter (fast) compress loop */ + + /* Defines for third byte of header */ +@@ -641,13 +642,11 @@ + } ; + #endif + +-void main ARGS((int,char **)); + void Usage ARGS((void)); + void comprexx ARGS((char **)); + void compdir ARGS((char *)); + void compress ARGS((int,int)); + void decompress ARGS((int,int)); +-char *rindex ARGS((char *,int)); + void read_error ARGS((void)); + void write_error ARGS((void)); + void abort_compress ARGS((void)); +@@ -694,13 +693,15 @@ + * deterministic, and can be done on the fly. Thus, the decompression + * procedure needs no input table, but tracks the way the table was built. + */ +-void ++int + main(argc, argv) + REG1 int argc; + REG2 char *argv[]; + { + REG3 char **filelist; + REG4 char **fileptr; ++ int i; ++ + + if (fgnd_flag = (signal(SIGINT, SIG_IGN) != SIG_IGN)) + signal(SIGINT, (SIG_TYPE)abort_compress); +@@ -714,7 +715,14 @@ + nomagic = 1; /* Original didn't have a magic number */ + #endif + +- filelist = fileptr = (char **)malloc(argc*sizeof(char *)); ++ for(i=0;i(MAXPATHLEN-1)){ ++ fprintf(stderr,"Filename too long\n"); ++ exit(1); ++ } ++ } ++ ++ filelist = fileptr = (char **)malloc(argc*sizeof(char *)); + *filelist = NULL; + + if((progname = rindex(argv[0], '/')) != 0) +@@ -853,8 +861,9 @@ + else + decompress(0, 1); + } +- ++ + exit((exit_code== -1) ? 1:exit_code); ++ return 0; + } + + void +@@ -1801,20 +1810,6 @@ + write_error(); + } + +-char * +-rindex(s, c) /* For those who don't have it in libc.a */ +- REG1 char *s; +- REG2 int c; +- { +- char *p; +- +- for (p = NULL; *s; s++) +- if (*s == (char)c) +- p = s; +- +- return(p); +- } +- + void + read_error() + { diff --git a/ncompress.spec b/ncompress.spec index fde1802..c21dff0 100644 --- a/ncompress.spec +++ b/ncompress.spec @@ -1,12 +1,14 @@ Summary: Fast compression and decompression utilities. Name: ncompress Version: 4.2.4 -Release: 24 +Release: 28 License: distributable Group: Applications/File Source: ftp://metalab.unc.edu/pub/Linux/utils/compress/ncompress-4.2.4.tar.Z Patch0: ncompress-4.2.4-make.patch Patch1: ncompress-4.2.4-lfs.patch +Patch2: ncompress-4.2.4-filenamelen.patch +BuildRequires: gcc glibc-devel fileutils BuildRoot: %{_tmppath}/%{name}-%{version}-root %description @@ -24,10 +26,11 @@ which are compatible with the original UNIX compress utility. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 -b .filenamelen %build -%ifarch i386 i486 i586 i686 +%ifarch i386 i486 i586 i686 athlon make "RPM_OPT_FLAGS=$RPM_OPT_FLAGS -D_GNU_SOURCE" ENDIAN=4321 %endif @@ -61,6 +64,18 @@ rm -rf $RPM_BUILD_ROOT %doc LZW.INFO README %changelog +* Wed Feb 27 2002 Trond Eivind Glomsrød 4.2.4-28 +- Rebuild + +* Wed Jan 09 2002 Tim Powers +- automated rebuild + +* Mon Nov 26 2001 Trond Eivind Glomsrød 4.2.4-26 +- Rebuild, to fix problem with broken man page (#56654) + +* Wed Nov 21 2001 Trond Eivind Glomsrød 4.2.4-25 +- Exit, don't segfault, when given too long filenames + * Sat Jun 09 2001 Florian La Roche - s390x change