aboutsummaryrefslogtreecommitdiff
path: root/devel/mcpp
diff options
context:
space:
mode:
authorOlli Hauer <ohauer@FreeBSD.org>2011-03-30 18:26:40 +0000
committerOlli Hauer <ohauer@FreeBSD.org>2011-03-30 18:26:40 +0000
commite64a650594faa0638c4e3440b36ad7938b3705d4 (patch)
tree6dab11016ff205040685cbef6e6d6e692bde6d6a /devel/mcpp
parentb511f050f5b7e51d4ba85ba9df462131e55025ab (diff)
downloadports-e64a650594faa0638c4e3440b36ad7938b3705d4.tar.gz
ports-e64a650594faa0638c4e3440b36ad7938b3705d4.zip
- add patches to fix some security and functionality issues
PR: ports/155934 Submitted by: Michael Gmelin <freebsd _at_ grem.de> Approved by: Kiyoshi MATSUI <kmatsui _at_ t3.rim.or.jp> (maintainer)
Notes
Notes: svn path=/head/; revision=272021
Diffstat (limited to 'devel/mcpp')
-rw-r--r--devel/mcpp/Makefile1
-rw-r--r--devel/mcpp/files/patch-src__internal.H19
-rw-r--r--devel/mcpp/files/patch-src__main.c11
-rw-r--r--devel/mcpp/files/patch-src__support.c20
-rw-r--r--devel/mcpp/files/patch-src__system.c21
5 files changed, 72 insertions, 0 deletions
diff --git a/devel/mcpp/Makefile b/devel/mcpp/Makefile
index ea25fb3ed1a0..2ebf54345355 100644
--- a/devel/mcpp/Makefile
+++ b/devel/mcpp/Makefile
@@ -7,6 +7,7 @@
PORTNAME= mcpp
PORTVERSION= 2.7.2
+PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/V.${PORTVERSION}
diff --git a/devel/mcpp/files/patch-src__internal.H b/devel/mcpp/files/patch-src__internal.H
new file mode 100644
index 000000000000..c21a9a6f765e
--- /dev/null
+++ b/devel/mcpp/files/patch-src__internal.H
@@ -0,0 +1,19 @@
+--- ./src/internal.H.orig 2008-08-27 15:01:16.000000000 +0200
++++ ./src/internal.H 2011-03-30 19:57:37.000000000 +0200
+@@ -390,6 +390,8 @@
+ extern char identifier[]; /* Lastly scanned name */
+ extern IFINFO ifstack[]; /* Information of #if nesting */
+ extern char work_buf[];
++extern FILEINFO * sh_file;
++extern int sh_line;
+ /* Temporary buffer for directive line and macro expansion */
+
+ /* main.c */
+@@ -557,6 +559,6 @@
+ #endif
+ #endif
+
+-#if HOST_HAVE_STPCPY
++#if HOST_HAVE_STPCPY && !defined(stpcpy)
+ extern char * stpcpy( char * dest, const char * src);
+ #endif
diff --git a/devel/mcpp/files/patch-src__main.c b/devel/mcpp/files/patch-src__main.c
new file mode 100644
index 000000000000..2bfbd5c674bf
--- /dev/null
+++ b/devel/mcpp/files/patch-src__main.c
@@ -0,0 +1,11 @@
+--- ./src/main.c.orig 2008-11-05 09:34:46.000000000 +0100
++++ ./src/main.c 2011-03-30 19:57:37.000000000 +0200
+@@ -326,6 +326,8 @@
+ = FALSE;
+ option_flags.trig = TRIGRAPHS_INIT;
+ option_flags.dig = DIGRAPHS_INIT;
++ sh_file = NULL;
++ sh_line = 0;
+ }
+
+ int mcpp_lib_main
diff --git a/devel/mcpp/files/patch-src__support.c b/devel/mcpp/files/patch-src__support.c
new file mode 100644
index 000000000000..08de1ec8b695
--- /dev/null
+++ b/devel/mcpp/files/patch-src__support.c
@@ -0,0 +1,20 @@
+--- ./src/support.c.orig 2008-06-10 10:32:33.000000000 +0200
++++ ./src/support.c 2011-03-30 19:57:37.000000000 +0200
+@@ -188,7 +188,7 @@
+ size_t length
+ )
+ {
+- if (mem_buf_p->bytes_avail < length) { /* Need to allocate more memory */
++ if (mem_buf_p->bytes_avail < length + 1) { /* Need to allocate more memory */
+ size_t size = MAX( BUF_INCR_SIZE, length);
+
+ if (mem_buf_p->buffer == NULL) { /* 1st append */
+@@ -1722,6 +1722,8 @@
+ sp -= 2;
+ while (*sp != '\n') /* Until end of line */
+ mcpp_fputc( *sp++, OUT);
++ mcpp_fputc( '\n', OUT);
++ wrong_line = TRUE;
+ }
+ goto end_line;
+ default: /* Not a comment */
diff --git a/devel/mcpp/files/patch-src__system.c b/devel/mcpp/files/patch-src__system.c
new file mode 100644
index 000000000000..5e80aabb2378
--- /dev/null
+++ b/devel/mcpp/files/patch-src__system.c
@@ -0,0 +1,21 @@
+--- ./src/system.c.orig 2008-11-26 10:53:51.000000000 +0100
++++ ./src/system.c 2011-03-30 19:57:37.000000000 +0200
+@@ -3858,6 +3858,9 @@
+ }
+ #endif
+
++FILEINFO* sh_file;
++int sh_line;
++
+ void sharp(
+ FILEINFO * sharp_file,
+ int flag /* Flag to append to the line for GCC */
+@@ -3868,8 +3871,6 @@
+ * else (i.e. 'sharp_file' is NULL) 'infile'.
+ */
+ {
+- static FILEINFO * sh_file;
+- static int sh_line;
+ FILEINFO * file;
+ int line;
+