diff options
| -rw-r--r-- | meta-oe/recipes-devtools/mcpp/files/CVE-2019-14274.patch | 34 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/mcpp/files/ice-mcpp.patch | 31 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb | 3 |
3 files changed, 36 insertions, 32 deletions
diff --git a/meta-oe/recipes-devtools/mcpp/files/CVE-2019-14274.patch b/meta-oe/recipes-devtools/mcpp/files/CVE-2019-14274.patch new file mode 100644 index 0000000000..a0c6584ecb --- /dev/null +++ b/meta-oe/recipes-devtools/mcpp/files/CVE-2019-14274.patch | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | From ea453aca2742be6ac43ba4ce0da6f938a7e5a5d8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: He Liu <liulonnie@gmail.com> | ||
| 3 | Date: Tue, 4 Feb 2014 11:00:40 -0800 | ||
| 4 | Subject: [PATCH] line comment bug | ||
| 5 | |||
| 6 | --- | ||
| 7 | src/support.c | 4 +++- | ||
| 8 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
| 9 | |||
| 10 | diff --git a/src/support.c b/src/support.c | ||
| 11 | index c57eaef..e3357e4 100644 | ||
| 12 | --- a/src/support.c | ||
| 13 | +++ b/src/support.c | ||
| 14 | @@ -188,7 +188,7 @@ static char * append_to_buffer( | ||
| 15 | size_t length | ||
| 16 | ) | ||
| 17 | { | ||
| 18 | - if (mem_buf_p->bytes_avail < length) { /* Need to allocate more memory */ | ||
| 19 | + if (mem_buf_p->bytes_avail < length + 1) { /* Need to allocate more memory */ | ||
| 20 | size_t size = MAX( BUF_INCR_SIZE, length); | ||
| 21 | |||
| 22 | if (mem_buf_p->buffer == NULL) { /* 1st append */ | ||
| 23 | @@ -1722,6 +1722,8 @@ com_start: | ||
| 24 | sp -= 2; | ||
| 25 | while (*sp != '\n') /* Until end of line */ | ||
| 26 | mcpp_fputc( *sp++, OUT); | ||
| 27 | + mcpp_fputc('\n', OUT); | ||
| 28 | + wrong_line = TRUE; | ||
| 29 | } | ||
| 30 | goto end_line; | ||
| 31 | default: /* Not a comment */ | ||
| 32 | -- | ||
| 33 | 2.25.1 | ||
| 34 | |||
diff --git a/meta-oe/recipes-devtools/mcpp/files/ice-mcpp.patch b/meta-oe/recipes-devtools/mcpp/files/ice-mcpp.patch index 8103cf0920..1df3ae55bc 100644 --- a/meta-oe/recipes-devtools/mcpp/files/ice-mcpp.patch +++ b/meta-oe/recipes-devtools/mcpp/files/ice-mcpp.patch | |||
| @@ -114,37 +114,6 @@ diff -r -c -N ../mcpp-2.7.2-old/src/main.c ./src/main.c | |||
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | int mcpp_lib_main | 116 | int mcpp_lib_main |
| 117 | diff -r -c -N ../mcpp-2.7.2-old/src/support.c ./src/support.c | ||
| 118 | *** ../mcpp-2.7.2-old/src/support.c Tue Jun 10 06:02:33 2008 | ||
| 119 | --- ./src/support.c Fri May 14 12:40:56 2010 | ||
| 120 | *************** | ||
| 121 | *** 188,194 **** | ||
| 122 | size_t length | ||
| 123 | ) | ||
| 124 | { | ||
| 125 | ! if (mem_buf_p->bytes_avail < length) { /* Need to allocate more memory */ | ||
| 126 | size_t size = MAX( BUF_INCR_SIZE, length); | ||
| 127 | |||
| 128 | if (mem_buf_p->buffer == NULL) { /* 1st append */ | ||
| 129 | --- 188,194 ---- | ||
| 130 | size_t length | ||
| 131 | ) | ||
| 132 | { | ||
| 133 | ! if (mem_buf_p->bytes_avail < length + 1) { /* Need to allocate more memory */ | ||
| 134 | size_t size = MAX( BUF_INCR_SIZE, length); | ||
| 135 | |||
| 136 | if (mem_buf_p->buffer == NULL) { /* 1st append */ | ||
| 137 | *************** | ||
| 138 | *** 1722,1727 **** | ||
| 139 | --- 1722,1729 ---- | ||
| 140 | sp -= 2; | ||
| 141 | while (*sp != '\n') /* Until end of line */ | ||
| 142 | mcpp_fputc( *sp++, OUT); | ||
| 143 | + mcpp_fputc( '\n', OUT); | ||
| 144 | + wrong_line = TRUE; | ||
| 145 | } | ||
| 146 | goto end_line; | ||
| 147 | default: /* Not a comment */ | ||
| 148 | diff -r -c -N ../mcpp-2.7.2-old/src/system.c ./src/system.c | 117 | diff -r -c -N ../mcpp-2.7.2-old/src/system.c ./src/system.c |
| 149 | *** ../mcpp-2.7.2-old/src/system.c 2008-11-26 10:53:51.000000000 +0100 | 118 | *** ../mcpp-2.7.2-old/src/system.c 2008-11-26 10:53:51.000000000 +0100 |
| 150 | --- ./src/system.c 2011-02-21 16:18:05.678058106 +0100 | 119 | --- ./src/system.c 2011-02-21 16:18:05.678058106 +0100 |
diff --git a/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb b/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb index b5ca495663..f8125f72d9 100644 --- a/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb +++ b/meta-oe/recipes-devtools/mcpp/mcpp_2.7.2.bb | |||
| @@ -4,7 +4,8 @@ LICENSE = "BSD-2-Clause" | |||
| 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=5ca370b75ec890321888a00cea9bc1d5" | 4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=5ca370b75ec890321888a00cea9bc1d5" |
| 5 | 5 | ||
| 6 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ | 6 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ |
| 7 | file://ice-mcpp.patch " | 7 | file://ice-mcpp.patch \ |
| 8 | file://CVE-2019-14274.patch" | ||
| 8 | SRC_URI[md5sum] = "512de48c87ab023a69250edc7a0c7b05" | 9 | SRC_URI[md5sum] = "512de48c87ab023a69250edc7a0c7b05" |
| 9 | SRC_URI[sha256sum] = "3b9b4421888519876c4fc68ade324a3bbd81ceeb7092ecdbbc2055099fcb8864" | 10 | SRC_URI[sha256sum] = "3b9b4421888519876c4fc68ade324a3bbd81ceeb7092ecdbbc2055099fcb8864" |
| 10 | 11 | ||
