diff options
author | vs <vs@FreeBSD.org> | 2005-01-13 17:34:42 +0800 |
---|---|---|
committer | vs <vs@FreeBSD.org> | 2005-01-13 17:34:42 +0800 |
commit | 388e150bc6ee05319fac6bfb2c0e6d2b019858e7 (patch) | |
tree | 70ecf43000c53006206e773c51568e70ec47e4b0 /graphics/urt | |
parent | 2354f91c25dba4c25985110d795380f0ac9829db (diff) | |
download | freebsd-ports-gnome-388e150bc6ee05319fac6bfb2c0e6d2b019858e7.tar.gz freebsd-ports-gnome-388e150bc6ee05319fac6bfb2c0e6d2b019858e7.tar.zst freebsd-ports-gnome-388e150bc6ee05319fac6bfb2c0e6d2b019858e7.zip |
- Fix some potential buffer overflows
- build cleanup
Submitted by: Pedro F. Giffuni
Diffstat (limited to 'graphics/urt')
-rw-r--r-- | graphics/urt/Makefile | 2 | ||||
-rw-r--r-- | graphics/urt/files/patch-config::urt | 20 | ||||
-rw-r--r-- | graphics/urt/files/patch-get::getx11::XGetHClrs.c | 8 | ||||
-rw-r--r-- | graphics/urt/files/patch-lib-rle_open_f.c | 44 | ||||
-rw-r--r-- | graphics/urt/files/patch-lib-scanargs.c | 10 | ||||
-rw-r--r-- | graphics/urt/pkg-plist | 54 |
6 files changed, 91 insertions, 47 deletions
diff --git a/graphics/urt/Makefile b/graphics/urt/Makefile index df14be1985be..48ea3613a015 100644 --- a/graphics/urt/Makefile +++ b/graphics/urt/Makefile @@ -7,7 +7,7 @@ PORTNAME= urt PORTVERSION= 3.1b1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics MASTER_SITES= ftp://ftp.iastate.edu/pub/utah-raster/ DISTNAME= urt diff --git a/graphics/urt/files/patch-config::urt b/graphics/urt/files/patch-config::urt index 95b15b5f3551..37520c4548e5 100644 --- a/graphics/urt/files/patch-config::urt +++ b/graphics/urt/files/patch-config::urt @@ -1,5 +1,5 @@ ---- config/urt.orig Thu Jul 16 04:47:15 1992 -+++ config/urt Fri Dec 27 23:19:11 2002 +--- config/urt.orig Wed Jul 15 19:47:15 1992 ++++ config/urt Wed Jan 12 17:22:42 2005 @@ -1,3 +1,7 @@ +# Configuration for HP 9000/300 series running BSD4.3 + @@ -45,7 +45,7 @@ # You can put any system dependent flags here. -ExtraCFLAGS = -+ExtraCFLAGS = -fno-strength-reduce ++ExtraCFLAGS = # System specific or configuration parameters. Define according to your # environment and desires. @@ -65,20 +65,22 @@ -##define USE_L_FLAG Use -Llibdir -lrle instead of libdir/liblre.a. -##define USE_PROTOTYPES Declare library functions with ANSI-C prototypes. -##define USE_RANDOM Your libc has the BSD random() function. +-##define USE_STDARG Use 'stdarg' instead of 'varargs' (ANSI). +-##define USE_STDLIB_H You have "stdlib.h". +-##define USE_UNISTD_H You have "unistd.h". +#define SYS_V_SETPGRP Your system has the SysV setpgrp() call. +#define USE_L_FLAG Use -Llibdir -lrle instead of libdir/liblre.a. +#define USE_PROTOTYPES Declare library functions with ANSI-C prototypes. +#define USE_RANDOM Your libc has the BSD random() function. - ##define USE_STDARG Use 'stdarg' instead of 'varargs' (ANSI). --##define USE_STDLIB_H You have "stdlib.h". --##define USE_UNISTD_H You have "unistd.h". ++#define USE_STDARG Use 'stdarg' instead of 'varargs' (ANSI). +#define USE_STDLIB_H You have "stdlib.h". +#define USE_UNISTD_H You have "unistd.h". ##define USE_STRING_H You have "string.h", not "strings.h" -##define VOID_STAR Your C compiler understands the 'void *' declaration. -+#define VOID_STAR Your C compiler understands the 'void *' declaration. - ##define USE_XLIBINT_H You have the include file <X11/Xlibint.h>. +-##define USE_XLIBINT_H You have the include file <X11/Xlibint.h>. -##define X_SHARED_MEMORY You have the XShm extension. ++#define VOID_STAR Your C compiler understands the 'void *' declaration. ++#define USE_XLIBINT_H You have the include file <X11/Xlibint.h>. +#define X_SHARED_MEMORY You have the XShm extension. # DEST is where all programs will be put. Can be overridden for specific @@ -125,7 +127,7 @@ #ifdef FB -LIBFB = /usr/brl/lib/libfb.a -+LIBFB = $(X11BASE)/lib/brl/libfb.a ++LIBFB = $(LOCALBASE)/lib/libfb.a #endif #ifdef GRINNELL diff --git a/graphics/urt/files/patch-get::getx11::XGetHClrs.c b/graphics/urt/files/patch-get::getx11::XGetHClrs.c new file mode 100644 index 000000000000..39db27126c45 --- /dev/null +++ b/graphics/urt/files/patch-get::getx11::XGetHClrs.c @@ -0,0 +1,8 @@ +--- get/getx11/XGetHClrs.c.orig Wed Jan 12 17:03:11 2005 ++++ get/getx11/XGetHClrs.c Wed Jan 12 17:06:40 2005 +@@ -1,5 +1,4 @@ + #ifndef XLIBINT_H_NOT_AVAILABLE +-#include <X11/copyright.h> + + /* $XConsortium: XGetHClrs.c,v 11.10 88/09/06 16:07:50 martin Exp $ */ + /* Copyright Massachusetts Institute of Technology 1986 */ diff --git a/graphics/urt/files/patch-lib-rle_open_f.c b/graphics/urt/files/patch-lib-rle_open_f.c new file mode 100644 index 000000000000..58b68ed23abc --- /dev/null +++ b/graphics/urt/files/patch-lib-rle_open_f.c @@ -0,0 +1,44 @@ +--- lib/rle_open_f.c.orig Thu May 13 21:28:51 1993 ++++ lib/rle_open_f.c Wed Jan 12 16:06:07 2005 +@@ -56,6 +56,7 @@ + CONST_DECL char *err_str; + register char *cp; + char *combuf; ++ size_t combuf_size; + + #ifdef STDIO_NEEDS_BINARY + char mode_string[32]; /* Should be enough. */ +@@ -63,7 +64,7 @@ + /* Concatenate a 'b' onto the mode. */ + mode_string[0] = mode[0]; + mode_string[1] = 'b'; +- strcpy( mode_string + 2, mode + 1 ); ++ strncpy( mode_string + 2, mode + 1, sizeof(mode_string + 2) ); + mode = mode_string; + #endif + +@@ -150,7 +151,8 @@ + else if ( cp > file_name && *cp == '.' && *(cp + 1) == 'Z' ) + { + int thepid; /* PID from my_popen. */ +- combuf = (char *)malloc( 20 + strlen( file_name ) ); ++ combuf_size = 20 + strlen( file_name ); ++ combuf = (char *)malloc( combuf_size ); + if ( combuf == NULL ) + { + err_str = "%s: out of memory opening (compressed) %s for %s"; +@@ -158,11 +160,11 @@ + } + + if ( *mode == 'w' ) +- sprintf( combuf, "compress > %s", file_name ); ++ snprintf( combuf, combuf_size, "compress > %s", file_name ); + else if ( *mode == 'a' ) +- sprintf( combuf, "compress >> %s", file_name ); ++ snprintf( combuf, combuf_size, "compress >> %s", file_name ); + else +- sprintf( combuf, "compress -d < %s", file_name ); ++ snprintf( combuf, combuf_size, "compress -d < %s", file_name ); + + fp = my_popen( combuf, mode, &thepid ); + free( combuf ); diff --git a/graphics/urt/files/patch-lib-scanargs.c b/graphics/urt/files/patch-lib-scanargs.c deleted file mode 100644 index eb174fe955f0..000000000000 --- a/graphics/urt/files/patch-lib-scanargs.c +++ /dev/null @@ -1,10 +0,0 @@ ---- lib/scanargs.c.orig Tue Oct 28 07:54:53 2003 -+++ lib/scanargs.c Tue Oct 28 07:55:14 2003 -@@ -43,6 +43,7 @@ - #include "rle_config.h" - #include <stdio.h> - #include <ctype.h> -+#define USE_STDARG - #ifndef USE_STDARG - #include <varargs.h> - #else diff --git a/graphics/urt/pkg-plist b/graphics/urt/pkg-plist index b6ea293e4564..2d8a545670ff 100644 --- a/graphics/urt/pkg-plist +++ b/graphics/urt/pkg-plist @@ -76,30 +76,30 @@ include/rle_raw.h lib/librle.a lib/librle.so lib/librle.so.1 -%%PORTDOCS%%share/doc/urt/README -%%PORTDOCS%%share/doc/urt/pics/README -%%PORTDOCS%%share/doc/urt/pics/bullet_holes_and_shot_turb.ps.Z -%%PORTDOCS%%share/doc/urt/pics/center_masks_and_fin_turb.ps.Z -%%PORTDOCS%%share/doc/urt/pics/dart_and_strtch.ps.Z -%%PORTDOCS%%share/doc/urt/pics/dart_shadow_and_monkey.ps.Z -%%PORTDOCS%%share/doc/urt/pics/pahriah_final.ps.Z -%%PORTDOCS%%share/doc/urt/pics/scanned_and_cropped.ps.Z -%%PORTDOCS%%share/doc/urt/rle.doc -%%PORTDOCS%%share/doc/urt/rle.mss -%%PORTDOCS%%share/doc/urt/rle.ps -%%PORTDOCS%%share/doc/urt/rle_head.ps -%%PORTDOCS%%share/doc/urt/rleops.ps -%%PORTDOCS%%share/doc/urt/toolkit.bib -%%PORTDOCS%%share/doc/urt/toolkit.doc -%%PORTDOCS%%share/doc/urt/toolkit.mss -%%PORTDOCS%%share/doc/urt/toolkit.ps -%%PORTDOCS%%share/examples/urt/img/README -%%PORTDOCS%%share/examples/urt/img/christmas_ball.rle -%%PORTDOCS%%share/examples/urt/img/dart.rle -%%PORTDOCS%%share/examples/urt/img/lenna.rle -%%PORTDOCS%%share/examples/urt/img/mandrill.rle -%%PORTDOCS%%share/examples/urt/img/tack_w_shadow.rle -%%PORTDOCS%%@dirrm share/doc/urt/pics -%%PORTDOCS%%@dirrm share/doc/urt -%%PORTDOCS%%@dirrm share/examples/urt/img -%%PORTDOCS%%@dirrm share/examples/urt +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/pics/README +%%PORTDOCS%%%%DOCSDIR%%/pics/bullet_holes_and_shot_turb.ps.Z +%%PORTDOCS%%%%DOCSDIR%%/pics/center_masks_and_fin_turb.ps.Z +%%PORTDOCS%%%%DOCSDIR%%/pics/dart_and_strtch.ps.Z +%%PORTDOCS%%%%DOCSDIR%%/pics/dart_shadow_and_monkey.ps.Z +%%PORTDOCS%%%%DOCSDIR%%/pics/pahriah_final.ps.Z +%%PORTDOCS%%%%DOCSDIR%%/pics/scanned_and_cropped.ps.Z +%%PORTDOCS%%%%DOCSDIR%%/rle.doc +%%PORTDOCS%%%%DOCSDIR%%/rle.mss +%%PORTDOCS%%%%DOCSDIR%%/rle.ps +%%PORTDOCS%%%%DOCSDIR%%/rle_head.ps +%%PORTDOCS%%%%DOCSDIR%%/rleops.ps +%%PORTDOCS%%%%DOCSDIR%%/toolkit.bib +%%PORTDOCS%%%%DOCSDIR%%/toolkit.doc +%%PORTDOCS%%%%DOCSDIR%%/toolkit.mss +%%PORTDOCS%%%%DOCSDIR%%/toolkit.ps +%%PORTDOCS%%%%EXAMPLESDIR%%/img/README +%%PORTDOCS%%%%EXAMPLESDIR%%/img/christmas_ball.rle +%%PORTDOCS%%%%EXAMPLESDIR%%/img/dart.rle +%%PORTDOCS%%%%EXAMPLESDIR%%/img/lenna.rle +%%PORTDOCS%%%%EXAMPLESDIR%%/img/mandrill.rle +%%PORTDOCS%%%%EXAMPLESDIR%%/img/tack_w_shadow.rle +%%PORTDOCS%%@dirrm %%DOCSDIR%%/pics +%%PORTDOCS%%@dirrm %%DOCSDIR%% +%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%/img +%%PORTDOCS%%@dirrm %%EXAMPLESDIR%% |