Gentoo Archives: gentoo-commits

From: Aaron Bauman <bman@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/autotrace/files/, media-gfx/autotrace/
Date: Sat, 02 Jul 2016 03:06:23
Message-Id: 1467428651.b6d1c95e6a0a3ea6ae4d8b397845120e23e0f67b.bman@gentoo
1 commit: b6d1c95e6a0a3ea6ae4d8b397845120e23e0f67b
2 Author: Aaron Bauman <bman <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 2 03:04:11 2016 +0000
4 Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 2 03:04:11 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6d1c95e
7
8 media-gfx/autotrace: add patch for CVE-2013-1953 per security bug #466078
9
10 media-gfx/autotrace/autotrace-0.31.1-r7.ebuild | 61 ++++++++++++++++++++++
11 .../files/autotrace-0.31.1-CVE-2013-1953.patch | 12 +++++
12 2 files changed, 73 insertions(+)
13
14 diff --git a/media-gfx/autotrace/autotrace-0.31.1-r7.ebuild b/media-gfx/autotrace/autotrace-0.31.1-r7.ebuild
15 new file mode 100644
16 index 0000000..f24dea4
17 --- /dev/null
18 +++ b/media-gfx/autotrace/autotrace-0.31.1-r7.ebuild
19 @@ -0,0 +1,61 @@
20 +# Copyright 1999-2016 Gentoo Foundation
21 +# Distributed under the terms of the GNU General Public License v2
22 +# $Id$
23 +
24 +EAPI=5
25 +inherit autotools eutils
26 +
27 +_dpatch=15
28 +
29 +DESCRIPTION="A program for converting bitmaps to vector graphics"
30 +HOMEPAGE="http://packages.qa.debian.org/a/autotrace.html http://autotrace.sourceforge.net/"
31 +SRC_URI="mirror://debian/pool/main/a/${PN}/${PN}_${PV}.orig.tar.gz
32 + mirror://debian/pool/main/a/${PN}/${PN}_${PV}-${_dpatch}.diff.gz"
33 +
34 +LICENSE="GPL-2 LGPL-2.1"
35 +SLOT="0"
36 +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd"
37 +IUSE="+imagemagick static-libs"
38 +
39 +RDEPEND="media-libs/libexif:=
40 + media-libs/libpng:0=
41 + >=media-libs/ming-0.4.2:=
42 + >=media-gfx/pstoedit-3.50:=
43 + imagemagick? ( >=media-gfx/imagemagick-6.6.2.5 )"
44 +DEPEND="${RDEPEND}
45 + virtual/pkgconfig"
46 +
47 +DOCS=( AUTHORS ChangeLog NEWS README )
48 +
49 +src_prepare() {
50 + epatch "${WORKDIR}"/${PN}_${PV}-${_dpatch}.diff
51 +
52 + epatch \
53 + "${FILESDIR}"/${P}-{m4,libpng14,pkgconfig}.patch \
54 + "${FILESDIR}"/${P}-swf-output.patch \
55 + "${FILESDIR}"/${P}-GetOnePixel.patch \
56 + "${FILESDIR}"/${P}-libpng-1.5.patch
57 +
58 + # Fix building on PowerPC with Altivec
59 + epatch "${FILESDIR}"/${P}-bool.patch
60 +
61 + # Addresses bug #466078
62 + epatch "${FILESDIR}"/${P}-CVE-2013-1953.patch
63 +
64 + sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.in || die #468496
65 +
66 + eautoreconf
67 +}
68 +
69 +src_configure() {
70 + econf \
71 + $(use_enable static-libs static) \
72 + $(use_with imagemagick magick) \
73 + --with-ming \
74 + --with-pstoedit
75 +}
76 +
77 +src_install() {
78 + default
79 + prune_libtool_files --all
80 +}
81
82 diff --git a/media-gfx/autotrace/files/autotrace-0.31.1-CVE-2013-1953.patch b/media-gfx/autotrace/files/autotrace-0.31.1-CVE-2013-1953.patch
83 new file mode 100644
84 index 0000000..38d7eae
85 --- /dev/null
86 +++ b/media-gfx/autotrace/files/autotrace-0.31.1-CVE-2013-1953.patch
87 @@ -0,0 +1,12 @@
88 +diff -up autotrace-0.31.1/input-bmp.c.orig autotrace-0.31.1/input-bmp.c
89 +--- autotrace-0.31.1/input-bmp.c.orig 2002-10-10 22:44:08.000000000 +0200
90 ++++ autotrace-0.31.1/input-bmp.c 2013-06-28 10:24:58.336056959 +0200
91 +@@ -166,7 +166,7 @@ input_bmp_reader (at_string filename,
92 + /* 36 */
93 + Maps = 4;
94 + }
95 +- else if (Bitmap_File_Head.biSize <= 64) /* Probably OS/2 2.x */
96 ++ else if (Bitmap_File_Head.biSize >= 40 && Bitmap_File_Head.biSize <= 64) /* Probably OS/2 2.x */
97 + {
98 + if (!ReadOK (fd, buffer, Bitmap_File_Head.biSize - 4))
99 + {