diff options
author | Maho Nakata <maho@FreeBSD.org> | 2008-08-13 07:51:51 +0000 |
---|---|---|
committer | Maho Nakata <maho@FreeBSD.org> | 2008-08-13 07:51:51 +0000 |
commit | 0c195ec951fc49ef292cade2c52c5064c6f53a41 (patch) | |
tree | 3f98f4a791bdd60e89a596fbec53caa6db384e3e /lang/f2c | |
parent | - Update to 4.3.p15 (diff) |
Patch from security/flawfinder, and bump portrevision.
Submitted by: Pedro Giffuni
Notes
Notes:
svn path=/head/; revision=218498
Diffstat (limited to 'lang/f2c')
-rw-r--r-- | lang/f2c/Makefile | 2 | ||||
-rw-r--r-- | lang/f2c/files/patch-better-security | 76 |
2 files changed, 77 insertions, 1 deletions
diff --git a/lang/f2c/Makefile b/lang/f2c/Makefile index 467f94b8c322..1189df75874d 100644 --- a/lang/f2c/Makefile +++ b/lang/f2c/Makefile @@ -7,7 +7,7 @@ PORTNAME= f2c PORTVERSION= 20060810 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= lang MASTER_SITES= ${MASTER_SITE_LOCAL} MASTER_SITE_SUBDIR= maho/f2c diff --git a/lang/f2c/files/patch-better-security b/lang/f2c/files/patch-better-security new file mode 100644 index 000000000000..ad5bffca9086 --- /dev/null +++ b/lang/f2c/files/patch-better-security @@ -0,0 +1,76 @@ +diff -ruN f2c.orig/files/patch-libf2c+lwrite.c f2c/files/patch-libf2c+lwrite.c +--- f2c.orig/files/patch-libf2c+lwrite.c 1969-12-31 19:00:00.000000000 -0500 ++++ f2c/files/patch-libf2c+lwrite.c 2008-07-29 14:05:35.000000000 -0500 +@@ -0,0 +1,24 @@ ++--- libf2c/lwrite.c.orig 2008-07-29 13:57:49.000000000 -0500 +++++ libf2c/lwrite.c 2008-07-29 14:02:33.000000000 -0500 ++@@ -107,10 +107,10 @@ ++ absn = -absn; ++ fmt = LLOW <= absn && absn < LHIGH ? LFFMT : LEFMT; ++ #ifdef USE_STRLEN ++- sprintf(buf, fmt, n); +++ snprintf(buf, sizeof(buf), fmt, n); ++ return strlen(buf); ++ #else ++- return sprintf(buf, fmt, n); +++ return snprintf(buf, sizeof(buf), fmt, n); ++ #endif ++ ++ #else ++@@ -134,7 +134,7 @@ ++ *b = 0; ++ goto f__ret; ++ } ++- sprintf(b, LGFMT, n); +++ snprintf(b, sizeof(b), LGFMT, n); ++ switch(*b) { ++ #ifndef WANT_LEAD_0 ++ case '0': +diff -ruN f2c.orig/files/patch-libf2c+open.c f2c/files/patch-libf2c+open.c +--- f2c.orig/files/patch-libf2c+open.c 1969-12-31 19:00:00.000000000 -0500 ++++ f2c/files/patch-libf2c+open.c 2008-07-29 14:08:51.000000000 -0500 +@@ -0,0 +1,29 @@ ++--- libf2c/open.c.orig 2008-07-29 13:58:04.000000000 -0500 +++++ libf2c/open.c 2008-07-29 14:08:30.000000000 -0500 ++@@ -12,7 +12,7 @@ ++ #ifdef KR_headers ++ extern char *malloc(); ++ #ifdef NON_ANSI_STDIO ++-extern char *mktemp(); +++extern int mkstemp(); ++ #endif ++ extern integer f_clos(); ++ #else ++@@ -187,7 +187,7 @@ ++ opnerr(a->oerr,107,"open") ++ } ++ else ++- sprintf(buf, "fort.%ld", (long)a->ounit); +++ snprintf(buf, sizeof(buf), "fort.%ld", (long)a->ounit); ++ b->uscrtch = 0; ++ b->uend=0; ++ b->uwrt = 0; ++@@ -211,7 +211,7 @@ ++ b->uscrtch=1; ++ #ifdef NON_ANSI_STDIO ++ (void) strcpy(buf,"tmp.FXXXXXX"); ++- (void) mktemp(buf); +++ (void) mkstemp(buf); ++ goto replace; ++ #else ++ if (!(b->ufd = tmpfile())) +diff -ruN f2c.orig/files/patch-libf2c+rawio.h f2c/files/patch-libf2c+rawio.h +--- f2c.orig/files/patch-libf2c+rawio.h 1969-12-31 19:00:00.000000000 -0500 ++++ f2c/files/patch-libf2c+rawio.h 2008-07-29 14:09:17.000000000 -0500 +@@ -0,0 +1,11 @@ ++--- libf2c/rawio.h.orig 2008-07-29 14:07:02.000000000 -0500 +++++ libf2c/rawio.h 2008-07-29 14:08:08.000000000 -0500 ++@@ -26,7 +26,7 @@ ++ #endif ++ #endif /*KR_HEADERS*/ ++ ++-extern char *mktemp(char*); +++extern int mkstemp(char*); ++ ++ #ifdef __cplusplus ++ } |