diff options
author | Justin Lecher <jlec@gentoo.org> | 2012-06-19 06:21:16 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2012-06-19 06:21:16 +0000 |
commit | 770a5d3edb324322a8613e95f57fc0d01e64d704 (patch) | |
tree | a835ca1bb80cb3b05a8c077860f2f0358516f613 /sci-chemistry | |
parent | marked x86 per bug 414755 (diff) | |
download | gentoo-2-770a5d3edb324322a8613e95f57fc0d01e64d704.tar.gz gentoo-2-770a5d3edb324322a8613e95f57fc0d01e64d704.tar.bz2 gentoo-2-770a5d3edb324322a8613e95f57fc0d01e64d704.zip |
sci-chemistry/mosflm: Fix Buffer overflow, #421843
(Portage version: 2.2.0_alpha110/cvs/Linux x86_64)
Diffstat (limited to 'sci-chemistry')
-rw-r--r-- | sci-chemistry/mosflm/ChangeLog | 9 | ||||
-rw-r--r-- | sci-chemistry/mosflm/files/mosflm-7.0.7-buffer-overflow.patch | 16 | ||||
-rw-r--r-- | sci-chemistry/mosflm/files/mosflm-7.0.7-impl-dec.patch | 29 | ||||
-rw-r--r-- | sci-chemistry/mosflm/mosflm-7.0.7-r2.ebuild | 73 |
4 files changed, 126 insertions, 1 deletions
diff --git a/sci-chemistry/mosflm/ChangeLog b/sci-chemistry/mosflm/ChangeLog index 26d7e29e257b..aba96cfc2954 100644 --- a/sci-chemistry/mosflm/ChangeLog +++ b/sci-chemistry/mosflm/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sci-chemistry/mosflm # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/mosflm/ChangeLog,v 1.15 2012/04/28 07:58:26 jlec Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/mosflm/ChangeLog,v 1.16 2012/06/19 06:21:16 jlec Exp $ + +*mosflm-7.0.7-r2 (19 Jun 2012) + + 19 Jun 2012; Justin Lecher <jlec@gentoo.org> +mosflm-7.0.7-r2.ebuild, + +files/mosflm-7.0.7-buffer-overflow.patch, + +files/mosflm-7.0.7-impl-dec.patch: + Fix Buffer overflow, #421843 *mosflm-7.0.7-r1 (28 Apr 2012) diff --git a/sci-chemistry/mosflm/files/mosflm-7.0.7-buffer-overflow.patch b/sci-chemistry/mosflm/files/mosflm-7.0.7-buffer-overflow.patch new file mode 100644 index 000000000000..90158eb458d5 --- /dev/null +++ b/sci-chemistry/mosflm/files/mosflm-7.0.7-buffer-overflow.patch @@ -0,0 +1,16 @@ + mosflm/pilatus_c.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/mosflm/pilatus_c.c b/mosflm/pilatus_c.c +index 1eaae26..cce5a02 100644 +--- a/mosflm/pilatus_c.c ++++ b/mosflm/pilatus_c.c +@@ -34,7 +34,7 @@ delete them later */ + int cbf_int[16]; + long cbf_int4[16]; + double cbf_double[16]; +- char cbf_char[16][24]; ++ char cbf_char[16][32]; + /* temporary from cbfwrap.c - pilatus doesn't have these, so we'll + delete them later */ + int id, index, iindex; diff --git a/sci-chemistry/mosflm/files/mosflm-7.0.7-impl-dec.patch b/sci-chemistry/mosflm/files/mosflm-7.0.7-impl-dec.patch new file mode 100644 index 000000000000..32f251f8e00c --- /dev/null +++ b/sci-chemistry/mosflm/files/mosflm-7.0.7-impl-dec.patch @@ -0,0 +1,29 @@ + mosflm/mosflm_jpeg.c | 1 + + src/dps/index/ind_gen_direct.c | 2 ++ + 2 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/mosflm/mosflm_jpeg.c b/mosflm/mosflm_jpeg.c +index 2b32b2e..54684d0 100644 +--- a/mosflm/mosflm_jpeg.c ++++ b/mosflm/mosflm_jpeg.c +@@ -76,6 +76,7 @@ G. Winter + #include <fcntl.h> + #include <stdio.h> + #include <stdlib.h> ++#include <string.h> + #if (defined _MSC_VER) + /* no need to do this for __MINGW_ (Mingw gcc) this is just about unique!*/ + #define S_IRWXU S_IREAD|S_IWRITE|S_IEXEC +diff --git a/src/dps/index/ind_gen_direct.c b/src/dps/index/ind_gen_direct.c +index 6e143df..2eea61b 100644 +--- a/src/dps/index/ind_gen_direct.c ++++ b/src/dps/index/ind_gen_direct.c +@@ -41,6 +41,8 @@ + /* #include <malloc.h> */ + #include "util.h" + #include "ind_gen_direct.h" ++#include "ind_help.h" ++#include "ind_sort_merge.h" + /* char *strcat( char *, const char *); */ + + diff --git a/sci-chemistry/mosflm/mosflm-7.0.7-r2.ebuild b/sci-chemistry/mosflm/mosflm-7.0.7-r2.ebuild new file mode 100644 index 000000000000..378c232b0bad --- /dev/null +++ b/sci-chemistry/mosflm/mosflm-7.0.7-r2.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/mosflm/mosflm-7.0.7-r2.ebuild,v 1.1 2012/06/19 06:21:16 jlec Exp $ + +EAPI=4 + +inherit eutils fortran-2 toolchain-funcs versionator + +MY_PV="$(delete_all_version_separators)" +MY_P="${PN}${MY_PV}" + +DESCRIPTION="A program for integrating single crystal diffraction data from area detectors" +HOMEPAGE="http://www.mrc-lmb.cam.ac.uk/harry/mosflm/" +SRC_URI="${HOMEPAGE}ver${MY_PV}/build-it-yourself/${MY_P}.tgz" + +LICENSE="ccp4" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" +IUSE="" + +RDEPEND=" + virtual/fortran + app-shells/tcsh + virtual/jpeg + sci-libs/cbflib + sci-libs/ccp4-libs + sys-libs/ncurses + x11-libs/libxdl_view" +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + sed \ + -e "s:../cbf/lib/libcbf.a:-lcbf -limg:g" \ + -e "s:../jpg/libjpeg.a:-ljpeg:g" \ + -i ${PN}/Makefile || die + + sed \ + -e '/jinclude.h/d' \ + -i mosflm/mosflm_jpeg.c || die + + epatch \ + "${FILESDIR}"/${PV}-parallel.patch \ + "${FILESDIR}"/7.0.6-impl-dec.patch \ + "${FILESDIR}"/${P}-buffer-overflow.patch \ + "${FILESDIR}"/${P}-impl-dec.patch + + rm -rf test.f {cbf,jpg}/*.{h,c} || die +} + +src_compile() { + emake \ + MOSHOME="${S}" \ + DPS="${S}" \ + FC=$(tc-getFC) \ + FLINK=$(tc-getFC) \ + CC=$(tc-getCC) \ + AR_FLAGS=vru \ + MOSLIBS='-lccp4f -lccp4c -lxdl_view -lcurses -lXt -lmmdb -lccif -lstdc++' \ + MCFLAGS="-O0 -fno-second-underscore" \ + MOSFLAGS="${FFLAGS} -fno-second-underscore" \ + FFLAGS="${FFLAGS} -fno-second-underscore" \ + CFLAGS="${CFLAGS}" \ + MOSCFLAGS="${CFLAGS}" \ + LFLAGS="${LDFLAGS}" +} + +src_install() { + exeinto /usr/libexec/ccp4/bin/ + doexe bin/ipmosflm + dosym ../libexec/ccp4/bin/ip${PN} /usr/bin/ip${PN} +} |