Skip to content
Snippets Groups Projects
Verified Commit e3e41788 authored by Poncho's avatar Poncho
Browse files

app-misc/mat2: version bump

Package-Manager: Portage-2.3.49, Repoman-2.3.10
parent 2b80aa5b
No related branches found
No related tags found
No related merge requests found
DIST mat2-0.3.1.tar.gz 4105019 BLAKE2B 260df582dbfcb32056d8c6fa0f5135d219b7dcc41dc730b772ec42b60998aacf7256708ad70e0e1db943b9ab1a538eb571e4a77e8898e5c7d58b73d0665566cb SHA512 36d118faa8f0e6fca9d98d35c53afe5ffa993545887b9f94411b154e5fa67fe59143020429dc8cceedf28912ea6242707833983c42e564be75888eab607db5d5
DIST mat2-0.4.0.tar.gz 4129067 BLAKE2B 85b8eeb11b94d185f4495ae4ae5c13d383dd57e44f0f085b376cf3a7fdf6da1b62ee267677e5b5462c27e10875e838025e8273a45edea3070d43b63200ba4edd SHA512 8602d942ba53c48b7ae4823528c3c7c131b860170c6f8d9e8487f08a34bcdfcd43f747053efb3ada668fc4a590a24adf7c980ac46700394873938c0f6b1697c4
From de65f4f4d44d7961d1d6cd37b4fe7b5f78c03ea3 Mon Sep 17 00:00:00 2001
From: jvoisin <julien.voisin@dustri.org>
Date: Sun, 9 Sep 2018 19:09:05 +0200
Subject: [PATCH] Improve the resilience of MAT2 wrt. corrupted PNG
---
libmat2/images.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libmat2/images.py b/libmat2/images.py
index 837f015..03121e1 100644
--- a/libmat2/images.py
+++ b/libmat2/images.py
@@ -62,6 +62,10 @@ class PNGParser(_ImageParser):
def __init__(self, filename):
super().__init__(filename)
+
+ if imghdr.what(filename) != 'png':
+ raise ValueError
+
try: # better fail here than later
cairo.ImageSurface.create_from_png(self.filename)
except MemoryError:
--
2.18.0
......@@ -28,7 +28,6 @@ RDEPEND="${DEPEND}
media-libs/exiftool"
DOCS=( README.md doc/implementation_notes.md doc/threat_model.md )
PATCHES=( ${FILESDIR}/mat2-0.3.1_failing_test.patch )
python_test() {
"${EPYTHON}" -m unittest discover -v || die "Tests fail with ${EPYTHON}"
......@@ -37,7 +36,7 @@ python_test() {
python_install_all() {
distutils-r1_python_install_all
newman doc/mat.1 mat2.1
doman doc/mat2.1
doicon data/mat2.png # 1,920px × 2,783px
doicon -s scalable data/mat2.svg
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment