diff options
| author | Jose <jose@zeroc.com> | 2018-04-05 10:23:22 +0200 |
|---|---|---|
| committer | David Seifert <soap@gentoo.org> | 2018-04-18 19:02:03 +0200 |
| commit | aa225a5d3f8c225e3639ebe87a84cf05d28f7a72 (patch) | |
| tree | e591e3930fe285e23ad9e528eeb1fd7421fb0780 /dev-cpp/libmcpp/files/libmcpp-2.7.2-gniibe.patch | |
| parent | 68b8d9ed1fa31181067bbd5988f0eaa75c557fc2 (diff) | |
| download | gentoo-aa225a5d3f8c225e3639ebe87a84cf05d28f7a72.tar.gz gentoo-aa225a5d3f8c225e3639ebe87a84cf05d28f7a72.tar.bz2 gentoo-aa225a5d3f8c225e3639ebe87a84cf05d28f7a72.zip | |
dev-cpp/libmcpp: Add missing patches
* r3 include two new patches already in debian distributions, and mcpp forums.
- libmcpp-2.7.2-zeroc: patch is required for dev-libs/Ice to work propertly
- libmcpp-2.7.2-gniibe: patch include two simple security fixes
Closes: https://github.com/gentoo/gentoo/pull/7820
Diffstat (limited to 'dev-cpp/libmcpp/files/libmcpp-2.7.2-gniibe.patch')
| -rw-r--r-- | dev-cpp/libmcpp/files/libmcpp-2.7.2-gniibe.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/dev-cpp/libmcpp/files/libmcpp-2.7.2-gniibe.patch b/dev-cpp/libmcpp/files/libmcpp-2.7.2-gniibe.patch new file mode 100644 index 000000000000..cb5aa6c345ce --- /dev/null +++ b/dev-cpp/libmcpp/files/libmcpp-2.7.2-gniibe.patch @@ -0,0 +1,33 @@ +Description: Simple fixes + * Fix freeing unmalloced memory + The memory of 'in_file' is not malloced, but points to argv[]. + It is wrong to free it. + * When there is no input file specified by argv, it causes error + and fp_in == NULL. Check is needed to call fclose for fp_in. +Author: NIIBE Yutaka + +## Fixes the issue reported at: +## http://www.forallsecure.com/bug-reports/6b11b6fccda17cc467e055ccf7fec3fa2d89ec00/ + +Index: mcpp-2.7.2/src/main.c +=================================================================== +--- mcpp-2.7.2.orig/src/main.c 2013-07-09 03:03:05.610947658 +0000 ++++ mcpp-2.7.2/src/main.c 2013-07-09 03:03:05.534947624 +0000 +@@ -428,16 +428,11 @@ + + fatal_error_exit: + #if MCPP_LIB +- /* Free malloced memory */ +- if (mcpp_debug & MACRO_CALL) { +- if (in_file != stdin_name) +- free( in_file); +- } + clear_filelist(); + clear_symtable(); + #endif + +- if (fp_in != stdin) ++ if (fp_in && fp_in != stdin) + fclose( fp_in); + if (fp_out != stdout) + fclose( fp_out); |
