diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2019-06-22 09:21:01 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2019-06-22 09:21:44 +0100 |
commit | 677a68abfac2720af13042540adbb5f43b6475c3 (patch) | |
tree | 8ac9941cc35b4dbcfd3090fe8e8f5d307b62ebf1 /dev-util/radare2 | |
parent | net-misc/s6-networking: Version bump to 2.3.0.4 (diff) | |
download | gentoo-677a68abfac2720af13042540adbb5f43b6475c3.tar.gz gentoo-677a68abfac2720af13042540adbb5f43b6475c3.tar.bz2 gentoo-677a68abfac2720af13042540adbb5f43b6475c3.zip |
dev-util/radare2: fix double-free in cmd_mount.c, bug #688336
Reported-by: D'juan McDonald (domhnall)
Bug: https://bugs.gentoo.org/688336
Package-Manager: Portage-2.3.67, Repoman-2.3.15
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'dev-util/radare2')
-rw-r--r-- | dev-util/radare2/files/radare2-3.5.1-mount-free.patch | 22 | ||||
-rw-r--r-- | dev-util/radare2/radare2-3.5.1-r1.ebuild | 60 |
2 files changed, 82 insertions, 0 deletions
diff --git a/dev-util/radare2/files/radare2-3.5.1-mount-free.patch b/dev-util/radare2/files/radare2-3.5.1-mount-free.patch new file mode 100644 index 000000000000..ad27596fc124 --- /dev/null +++ b/dev-util/radare2/files/radare2-3.5.1-mount-free.patch @@ -0,0 +1,22 @@ +https://bugs.gentoo.org/688336 + +From 40453029179d230cf02ffed205f2d63e33981b8f Mon Sep 17 00:00:00 2001 +From: pancake <pancake@nopcode.org> +Date: Mon, 17 Jun 2019 11:34:49 +0200 +Subject: [PATCH] Fix #14334 - Double-free in ms command + +--- + libr/core/cmd_mount.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/libr/core/cmd_mount.c ++++ b/libr/core/cmd_mount.c +@@ -471,7 +471,7 @@ static int cmd_mount(void *data, const char *_input) { + rli->completion.run_user = rli->user; + r_line_completion_set (&rli->completion, ms_argc, ms_argv); + r_fs_shell_prompt (&shell, core->fs, input); +- free (cwd); ++ R_FREE (cwd); + r_pvector_clear (&rli->completion.args); + memcpy (&rli->completion, &c, sizeof (c)); + } diff --git a/dev-util/radare2/radare2-3.5.1-r1.ebuild b/dev-util/radare2/radare2-3.5.1-r1.ebuild new file mode 100644 index 000000000000..781c3273fe47 --- /dev/null +++ b/dev-util/radare2/radare2-3.5.1-r1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit bash-completion-r1 eutils + +DESCRIPTION="unix-like reverse engineering framework and commandline tools" +HOMEPAGE="http://www.radare.org" + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/radare/radare2" +else + SRC_URI="https://github.com/radare/radare2/archive/${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~arm ~arm64 ~x86" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="ssl libressl" + +RDEPEND=" + dev-libs/capstone:0= + ssl? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) +" +DEPEND="${RDEPEND}" +BDEPEND="virtual/pkgconfig" + +PATCHES=( + "${FILESDIR}"/${PN}-3.5.1-mount-free.patch +) + +src_configure() { + econf \ + --without-libuv \ + --with-syscapstone \ + $(use_with ssl openssl) +} + +src_install() { + default + + insinto /usr/share/zsh/site-functions + doins doc/zsh/_* + + newbashcomp doc/bash_autocompletion.sh "${PN}" + bashcomp_alias "${PN}" rafind2 r2 rabin2 rasm2 radiff2 + + # a workaround for unstable $(INSTALL) call, bug #574866 + local d + for d in doc/*; do + if [[ -d $d ]]; then + rm -rfv "$d" || die "failed to delete '$d'" + fi + done +} |