summaryrefslogtreecommitdiff
path: root/user/libexif/CVE-2017-7544.patch
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2019-08-01 04:20:02 -0500
committerMax Rees <maxcrees@me.com>2019-08-01 04:20:02 -0500
commit8544988613c315f3726b1ce2e277817e66456c2f (patch)
tree0b545df096a880441167ff126d9d37f472cef71e /user/libexif/CVE-2017-7544.patch
parentf876330a642caced116aac1dac31f38d6c924e8d (diff)
downloadpackages-8544988613c315f3726b1ce2e277817e66456c2f.tar.gz
packages-8544988613c315f3726b1ce2e277817e66456c2f.tar.bz2
packages-8544988613c315f3726b1ce2e277817e66456c2f.tar.xz
packages-8544988613c315f3726b1ce2e277817e66456c2f.zip
user/libexif: patch for CVE-2017-7544 and CVE-2018-20030 (#143)
Diffstat (limited to 'user/libexif/CVE-2017-7544.patch')
-rw-r--r--user/libexif/CVE-2017-7544.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/user/libexif/CVE-2017-7544.patch b/user/libexif/CVE-2017-7544.patch
new file mode 100644
index 000000000..534817417
--- /dev/null
+++ b/user/libexif/CVE-2017-7544.patch
@@ -0,0 +1,30 @@
+From c39acd1692023b26290778a02a9232c873f9d71a Mon Sep 17 00:00:00 2001
+From: Marcus Meissner <marcus@jet.franken.de>
+Date: Tue, 25 Jul 2017 23:38:56 +0200
+Subject: [PATCH] On saving makernotes, make sure the makernote container tags
+ has a type with 1 byte components.
+
+Fixes (at least):
+ https://sourceforge.net/p/libexif/bugs/130
+ https://sourceforge.net/p/libexif/bugs/129
+---
+ libexif/exif-data.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/libexif/exif-data.c b/libexif/exif-data.c
+index 67df4db..91f4c33 100644
+--- a/libexif/exif-data.c
++++ b/libexif/exif-data.c
+@@ -255,6 +255,12 @@ exif_data_save_data_entry (ExifData *data, ExifEntry *e,
+ exif_mnote_data_set_offset (data->priv->md, *ds - 6);
+ exif_mnote_data_save (data->priv->md, &e->data, &e->size);
+ e->components = e->size;
++ if (exif_format_get_size (e->format) != 1) {
++ /* e->format is taken from input code,
++ * but we need to make sure it is a 1 byte
++ * entity due to the multiplication below. */
++ e->format = EXIF_FORMAT_UNDEFINED;
++ }
+ }
+ }
+