diff options
author | Timothy Redaelli <drizzt@gentoo.org> | 2007-07-14 14:51:34 +0000 |
---|---|---|
committer | Timothy Redaelli <drizzt@gentoo.org> | 2007-07-14 14:51:34 +0000 |
commit | e995dc6267b12936ea6b05057d313fdd4c50891b (patch) | |
tree | 6f19ef02e84aa590dd0b57e4ae1cd5bc910885ad /app-arch/unarj/files | |
parent | Add ~ia64 (diff) | |
download | gentoo-2-e995dc6267b12936ea6b05057d313fdd4c50891b.tar.gz gentoo-2-e995dc6267b12936ea6b05057d313fdd4c50891b.tar.bz2 gentoo-2-e995dc6267b12936ea6b05057d313fdd4c50891b.zip |
Version bump:
Add ~x86-fbsd keyword with a patch by gechi.it
(Portage version: 2.1.3_rc7)
Diffstat (limited to 'app-arch/unarj/files')
-rw-r--r-- | app-arch/unarj/files/digest-unarj-2.65 | 3 | ||||
-rw-r--r-- | app-arch/unarj/files/unarj-2.63a-sanitation.patch | 133 | ||||
-rw-r--r-- | app-arch/unarj/files/unarj-2.65-gentoo-fbsd.patch | 9 | ||||
-rw-r--r-- | app-arch/unarj/files/unarj-2.65-sanitation.patch | 29 |
4 files changed, 156 insertions, 18 deletions
diff --git a/app-arch/unarj/files/digest-unarj-2.65 b/app-arch/unarj/files/digest-unarj-2.65 new file mode 100644 index 000000000000..12cc8ad9b44f --- /dev/null +++ b/app-arch/unarj/files/digest-unarj-2.65 @@ -0,0 +1,3 @@ +MD5 a35c9a969cfdbb621b2084dce65fda70 unarj-2.65.tgz 21568 +RMD160 54760b2896c29b35fd0af8a136e3412c2b2142f5 unarj-2.65.tgz 21568 +SHA256 092869f3b4d4943b3d999db4f266f39ab9e474f2984b813b20735283af068304 unarj-2.65.tgz 21568 diff --git a/app-arch/unarj/files/unarj-2.63a-sanitation.patch b/app-arch/unarj/files/unarj-2.63a-sanitation.patch new file mode 100644 index 000000000000..e8b36f050815 --- /dev/null +++ b/app-arch/unarj/files/unarj-2.63a-sanitation.patch @@ -0,0 +1,133 @@ +Index: unarj-2.65/sanitize.c +=================================================================== +--- /dev/null ++++ unarj-2.65/sanitize.c +@@ -0,0 +1,81 @@ ++/* ++ * Path sanitation code by Ludwig Nussel <ludwig.nussel@suse.de>. Public Domain. ++ */ ++ ++#include "unarj.h" ++ ++#include <string.h> ++#include <limits.h> ++#include <stdio.h> ++ ++#ifndef PATH_CHAR ++#define PATH_CHAR '/' ++#endif ++#ifndef MIN ++#define MIN(x,y) ((x)<(y)?(x):(y)) ++#endif ++ ++/* copy src into dest converting the path to a relative one inside the current ++ * directory. dest must hold at least len bytes */ ++void copy_path_relative(char *dest, char *src, size_t len) ++{ ++ char* o = dest; ++ char* p = src; ++ ++ *o = '\0'; ++ ++ while(*p && *p == PATH_CHAR) ++p; ++ for(; len && *p;) ++ { ++ src = p; ++ p = strchr(src, PATH_CHAR); ++ if(!p) p = src+strlen(src); ++ ++ /* . => skip */ ++ if(p-src == 1 && *src == '.' ) ++ { ++ if(*p) src = ++p; ++ } ++ /* .. => pop one */ ++ else if(p-src == 2 && *src == '.' && src[1] == '.') ++ { ++ if(o != dest) ++ { ++ char* tmp; ++ *o = '\0'; ++ tmp = strrchr(dest, PATH_CHAR); ++ if(!tmp) ++ { ++ len += o-dest; ++ o = dest; ++ if(*p) ++p; ++ } ++ else ++ { ++ len += o-tmp; ++ o = tmp; ++ if(*p) ++p; ++ } ++ } ++ else /* nothing to pop */ ++ if(*p) ++p; ++ } ++ else ++ { ++ size_t copy; ++ if(o != dest) ++ { ++ --len; ++ *o++ = PATH_CHAR; ++ } ++ copy = MIN(p-src,len); ++ memcpy(o, src, copy); ++ len -= copy; ++ src += copy; ++ o += copy; ++ if(*p) ++p; ++ } ++ while(*p && *p == PATH_CHAR) ++p; ++ } ++ o[len?0:-1] = '\0'; ++} +Index: unarj-2.65/unarj.c +=================================================================== +--- unarj-2.65.orig/unarj.c ++++ unarj-2.65/unarj.c +@@ -235,6 +235,8 @@ static UCRC crctable[UCHAR_MAX + 1]; + + /* Functions */ + ++void copy_path_relative(char *dest, char *src, size_t len); ++ + static void + make_crctable() + { +@@ -738,11 +740,11 @@ extract() + + no_output = 0; + if (command == 'E') +- strncopy(name, &filename[entry_pos], sizeof(name)); ++ copy_path_relative(name, &filename[entry_pos], sizeof(name)); + else + { + strcpy(name, DEFAULT_DIR); +- strncopy(name+strlen(name), filename, sizeof(name)-strlen(name)); ++ copy_path_relative(name+strlen(name), filename, sizeof(name)-strlen(name)); + } + + if (host_os != OS) +Index: unarj-2.65/Makefile +=================================================================== +--- unarj-2.65.orig/Makefile ++++ unarj-2.65/Makefile +@@ -6,8 +6,8 @@ CC = gcc + CFLAGS = -O2 -Wall -ansi -pedantic -DUNIX + INSTALLDIR=/usr/local/bin + +-unarj: unarj.o decode.o environ.o +- $(CC) $(CFLAGS) -o unarj unarj.o decode.o environ.o ++unarj: unarj.o decode.o environ.o sanitize.o ++ $(CC) $(CFLAGS) -o unarj unarj.o decode.o environ.o sanitize.o + strip unarj + + clean: +@@ -19,3 +19,4 @@ install: + unarj.o: unarj.c unarj.h Makefile + environ.o: environ.c unarj.h Makefile + decode.o: decode.c unarj.h Makefile ++sanitize.o: sanitize.c unarj.h Makefile diff --git a/app-arch/unarj/files/unarj-2.65-gentoo-fbsd.patch b/app-arch/unarj/files/unarj-2.65-gentoo-fbsd.patch new file mode 100644 index 000000000000..755b9b696cc9 --- /dev/null +++ b/app-arch/unarj/files/unarj-2.65-gentoo-fbsd.patch @@ -0,0 +1,9 @@ +--- environ.c 2007-06-19 12:44:09 +0200 ++++ environ.c.new 2007-06-19 12:44:37 +0200 +@@ -437,7 +437,6 @@ + #endif + + extern struct tm *localtime(); +-extern time_t time(); + extern char *strcpy(); + extern voidp *malloc();
\ No newline at end of file diff --git a/app-arch/unarj/files/unarj-2.65-sanitation.patch b/app-arch/unarj/files/unarj-2.65-sanitation.patch index e8b36f050815..f37784ed2491 100644 --- a/app-arch/unarj/files/unarj-2.65-sanitation.patch +++ b/app-arch/unarj/files/unarj-2.65-sanitation.patch @@ -111,23 +111,16 @@ Index: unarj-2.65/unarj.c } if (host_os != OS) -Index: unarj-2.65/Makefile -=================================================================== ---- unarj-2.65.orig/Makefile -+++ unarj-2.65/Makefile -@@ -6,8 +6,8 @@ CC = gcc - CFLAGS = -O2 -Wall -ansi -pedantic -DUNIX - INSTALLDIR=/usr/local/bin +--- unarj-2.65.orig/Makefile Mon Nov 29 16:47:24 2004 ++++ unarj-2.65/Makefile Mon Nov 29 22:46:56 2004 +@@ -9,7 +9,9 @@ + + decode.o: decode.c unarj.h --unarj: unarj.o decode.o environ.o -- $(CC) $(CFLAGS) -o unarj unarj.o decode.o environ.o -+unarj: unarj.o decode.o environ.o sanitize.o -+ $(CC) $(CFLAGS) -o unarj unarj.o decode.o environ.o sanitize.o - strip unarj +-OBJS = unarj.o decode.o environ.o ++sanitize.o: sanitize.c unarj.h ++ ++OBJS = unarj.o decode.o environ.o sanitize.o - clean: -@@ -19,3 +19,4 @@ install: - unarj.o: unarj.c unarj.h Makefile - environ.o: environ.c unarj.h Makefile - decode.o: decode.c unarj.h Makefile -+sanitize.o: sanitize.c unarj.h Makefile + unarj: $(OBJS) + $(CC) $(LDFLAGS) $(OBJS) -o unarj |