summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pipping <sping@gentoo.org>2017-11-21 20:56:03 +0100
committerSebastian Pipping <sping@gentoo.org>2017-11-21 20:57:53 +0100
commitf6e0b2dea97f6b8f437b32c0602d654dac8fb64c (patch)
tree26cdbe21f91e5e378d5dc2a101518371d103f927 /media-gfx/optipng/files
parentapp-emacs/lua-mode: Regenerate Manifest. (diff)
downloadgentoo-f6e0b2dea97f6b8f437b32c0602d654dac8fb64c.tar.gz
gentoo-f6e0b2dea97f6b8f437b32c0602d654dac8fb64c.tar.bz2
gentoo-f6e0b2dea97f6b8f437b32c0602d654dac8fb64c.zip
media-gfx/optipng: CVE-2017-1000229
Package-Manager: Portage-2.3.10, Repoman-2.3.3
Diffstat (limited to 'media-gfx/optipng/files')
-rw-r--r--media-gfx/optipng/files/optipng-0.7.6-cve-2017-1000229.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/media-gfx/optipng/files/optipng-0.7.6-cve-2017-1000229.patch b/media-gfx/optipng/files/optipng-0.7.6-cve-2017-1000229.patch
new file mode 100644
index 000000000000..19dc3ad0c57b
--- /dev/null
+++ b/media-gfx/optipng/files/optipng-0.7.6-cve-2017-1000229.patch
@@ -0,0 +1,25 @@
+From 77ac8e9fd9b2c1aeec3951e2bb50f7cc2c1e92d2 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Sun, 19 Nov 2017 16:04:26 +0100
+Subject: [PATCH] Prevent integer overflow (bug #65, CVE-2017-1000229)
+
+---
+ src/minitiff/tiffread.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/minitiff/tiffread.c b/src/minitiff/tiffread.c
+index b4910ec..5f9b376 100644
+--- a/src/minitiff/tiffread.c
++++ b/src/minitiff/tiffread.c
+@@ -350,6 +350,8 @@ minitiff_read_info(struct minitiff_info *tiff_ptr, FILE *fp)
+ count = tiff_ptr->strip_offsets_count;
+ if (count == 0 || count > tiff_ptr->height)
+ goto err_invalid;
++ if (count > (size_t)-1 / sizeof(long))
++ goto err_memory;
+ tiff_ptr->strip_offsets = (long *)malloc(count * sizeof(long));
+ if (tiff_ptr->strip_offsets == NULL)
+ goto err_memory;
+--
+2.14.2
+