diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /media-libs/gegl/files |
reinit the tree, so we can have metadata
Diffstat (limited to 'media-libs/gegl/files')
11 files changed, 462 insertions, 0 deletions
diff --git a/media-libs/gegl/files/gegl-0.2.0-cve-2012-4433-1e92e523.patch b/media-libs/gegl/files/gegl-0.2.0-cve-2012-4433-1e92e523.patch new file mode 100644 index 000000000000..0babb0f41c1b --- /dev/null +++ b/media-libs/gegl/files/gegl-0.2.0-cve-2012-4433-1e92e523.patch @@ -0,0 +1,68 @@ +From 1e92e5235ded0415d555aa86066b8e4041ee5a53 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen <nils@redhat.com> +Date: Tue, 16 Oct 2012 14:58:27 +0000 +Subject: ppm-load: CVE-2012-4433: don't overflow memory allocation + +Carefully selected width/height values could cause the size of a later +allocation to overflow, resulting in a buffer much too small to store +the data which would then written beyond its end. +--- +diff --git a/operations/external/ppm-load.c b/operations/external/ppm-load.c +index efe6d56..3d6bce7 100644 +--- a/operations/external/ppm-load.c ++++ b/operations/external/ppm-load.c +@@ -84,7 +84,6 @@ ppm_load_read_header(FILE *fp, + /* Get Width and Height */ + img->width = strtol (header,&ptr,0); + img->height = atoi (ptr); +- img->numsamples = img->width * img->height * CHANNEL_COUNT; + + fgets (header,MAX_CHARS_IN_ROW,fp); + maxval = strtol (header,&ptr,0); +@@ -109,6 +108,16 @@ ppm_load_read_header(FILE *fp, + g_warning ("%s: Programmer stupidity error", G_STRLOC); + } + ++ /* Later on, img->numsamples is multiplied with img->bpc to allocate ++ * memory. Ensure it doesn't overflow. */ ++ if (!img->width || !img->height || ++ G_MAXSIZE / img->width / img->height / CHANNEL_COUNT < img->bpc) ++ { ++ g_warning ("Illegal width/height: %ld/%ld", img->width, img->height); ++ return FALSE; ++ } ++ img->numsamples = img->width * img->height * CHANNEL_COUNT; ++ + return TRUE; + } + +@@ -229,12 +238,24 @@ process (GeglOperation *operation, + if (!ppm_load_read_header (fp, &img)) + goto out; + +- rect.height = img.height; +- rect.width = img.width; +- + /* Allocating Array Size */ ++ ++ /* Should use g_try_malloc(), but this causes crashes elsewhere because the ++ * error signalled by returning FALSE isn't properly acted upon. Therefore ++ * g_malloc() is used here which aborts if the requested memory size can't be ++ * allocated causing a controlled crash. */ + img.data = (guchar*) g_malloc (img.numsamples * img.bpc); + ++ /* No-op without g_try_malloc(), see above. */ ++ if (! img.data) ++ { ++ g_warning ("Couldn't allocate %" G_GSIZE_FORMAT " bytes, giving up.", ((gsize)img.numsamples * img.bpc)); ++ goto out; ++ } ++ ++ rect.height = img.height; ++ rect.width = img.width; ++ + switch (img.bpc) + { + case 1: +-- +cgit v0.9.0.2 diff --git a/media-libs/gegl/files/gegl-0.2.0-cve-2012-4433-4757cdf7.patch b/media-libs/gegl/files/gegl-0.2.0-cve-2012-4433-4757cdf7.patch new file mode 100644 index 000000000000..f78557f5772a --- /dev/null +++ b/media-libs/gegl/files/gegl-0.2.0-cve-2012-4433-4757cdf7.patch @@ -0,0 +1,70 @@ +From 4757cdf73d3675478d645a3ec8250ba02168a230 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen <nils@redhat.com> +Date: Tue, 16 Oct 2012 14:56:40 +0000 +Subject: ppm-load: CVE-2012-4433: add plausibility checks for header fields + +Refuse values that are non-decimal, negative or overflow the target +type. +--- +diff --git a/operations/external/ppm-load.c b/operations/external/ppm-load.c +index 3d6bce7..465096d 100644 +--- a/operations/external/ppm-load.c ++++ b/operations/external/ppm-load.c +@@ -36,6 +36,7 @@ gegl_chant_file_path (path, _("File"), "", _("Path of file to load.")) + #include "gegl-chant.h" + #include <stdio.h> + #include <stdlib.h> ++#include <errno.h> + + typedef enum { + PIXMAP_ASCII = 51, +@@ -44,8 +45,8 @@ typedef enum { + + typedef struct { + map_type type; +- gint width; +- gint height; ++ glong width; ++ glong height; + gsize numsamples; /* width * height * channels */ + gsize bpc; /* bytes per channel */ + guchar *data; +@@ -82,11 +83,33 @@ ppm_load_read_header(FILE *fp, + } + + /* Get Width and Height */ +- img->width = strtol (header,&ptr,0); +- img->height = atoi (ptr); ++ errno = 0; ++ img->width = strtol (header,&ptr,10); ++ if (errno) ++ { ++ g_warning ("Error reading width: %s", strerror(errno)); ++ return FALSE; ++ } ++ else if (img->width < 0) ++ { ++ g_warning ("Error: width is negative"); ++ return FALSE; ++ } ++ ++ img->height = strtol (ptr,&ptr,10); ++ if (errno) ++ { ++ g_warning ("Error reading height: %s", strerror(errno)); ++ return FALSE; ++ } ++ else if (img->width < 0) ++ { ++ g_warning ("Error: height is negative"); ++ return FALSE; ++ } + + fgets (header,MAX_CHARS_IN_ROW,fp); +- maxval = strtol (header,&ptr,0); ++ maxval = strtol (header,&ptr,10); + + if ((maxval != 255) && (maxval != 65535)) + { +-- +cgit v0.9.0.2 diff --git a/media-libs/gegl/files/gegl-0.2.0-ffmpeg-0.11.diff b/media-libs/gegl/files/gegl-0.2.0-ffmpeg-0.11.diff new file mode 100644 index 000000000000..8e9a328524c3 --- /dev/null +++ b/media-libs/gegl/files/gegl-0.2.0-ffmpeg-0.11.diff @@ -0,0 +1,57 @@ +From 97067622352e58f86a24851dacb1f5daa0762897 Mon Sep 17 00:00:00 2001 +From: nick black <nick.black@sprezzatech.com> +Date: Fri, 14 Dec 2012 04:11:16 +0000 +Subject: port gegl forward to libav 54 + +--- +diff --git a/operations/external/ff-load.c b/operations/external/ff-load.c +index 442ec5f..75d26e9 100644 +--- a/operations/external/ff-load.c ++++ b/operations/external/ff-load.c +@@ -137,7 +137,7 @@ ff_cleanup (GeglChantO *o) + if (p->enc) + avcodec_close (p->enc); + if (p->ic) +- av_close_input_file (p->ic); ++ avformat_close_input(&p->ic); + if (p->lavc_frame) + av_free (p->lavc_frame); + +@@ -216,9 +216,9 @@ decode_frame (GeglOperation *operation, + { + do + { +- if (av_read_packet (p->ic, &p->pkt) < 0) ++ if (av_read_frame (p->ic, &p->pkt) < 0) + { +- fprintf (stderr, "av_read_packet failed for %s\n", ++ fprintf (stderr, "av_read_frame failed for %s\n", + o->path); + return -1; + } +@@ -271,12 +271,12 @@ prepare (GeglOperation *operation) + gint err; + + ff_cleanup (o); +- err = av_open_input_file (&p->ic, o->path, NULL, 0, NULL); ++ err = avformat_open_input(&p->ic, o->path, NULL, 0); + if (err < 0) + { + print_error (o->path, err); + } +- err = av_find_stream_info (p->ic); ++ err = avformat_find_stream_info (p->ic, NULL); + if (err < 0) + { + g_warning ("ff-load: error finding stream info for %s", o->path); +@@ -312,7 +312,7 @@ prepare (GeglOperation *operation) + if (p->codec->capabilities & CODEC_CAP_TRUNCATED) + p->enc->flags |= CODEC_FLAG_TRUNCATED; + +- if (avcodec_open (p->enc, p->codec) < 0) ++ if (avcodec_open2 (p->enc, p->codec, NULL) < 0) + { + g_warning ("error opening codec %s", p->enc->codec->name); + return; +-- +cgit v0.9.1 diff --git a/media-libs/gegl/files/gegl-0.2.0-g_log_domain.patch b/media-libs/gegl/files/gegl-0.2.0-g_log_domain.patch new file mode 100644 index 000000000000..cdb42b2ca5f2 --- /dev/null +++ b/media-libs/gegl/files/gegl-0.2.0-g_log_domain.patch @@ -0,0 +1,25 @@ +From deaa974528ac1f4099d091a333214b1a50147243 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Wed, 1 May 2013 00:39:42 +0200 +Subject: [PATCH] Prevent double escaping / error "stray ‘\’ in program" + +--- + gegl/Makefile.am | 1 + + 1 file changed, 1 insertion(+), 0 deletion(-) + +diff --git a/gegl/Makefile.am b/gegl/Makefile.am +index 43010ce..fd046d2 100644 +--- a/gegl/Makefile.am ++++ b/gegl/Makefile.am +@@ -119,7 +119,8 @@ INCLUDES = $(AM_CFLAGS) $(AM_CPPFLAGS) + + Gegl-@GEGL_API_VERSION@.gir: libgegl-@GEGL_API_VERSION@.la Makefile + Gegl_@GEGL_MAJOR_VERSION@_@GEGL_MINOR_VERSION@_gir_INCLUDES = GObject-2.0 GLib-2.0 Babl-0.1 + Gegl_@GEGL_MAJOR_VERSION@_@GEGL_MINOR_VERSION@_gir_CFLAGS = $(INCLUDES) ++INTROSPECTION_SCANNER_ENV = CFLAGS="${CFLAGS} "-D'G_LOG_DOMAIN="GEGL-"__FILE__' # No extra backslashes here! + Gegl_@GEGL_MAJOR_VERSION@_@GEGL_MINOR_VERSION@_gir_LIBS = libgegl-@GEGL_API_VERSION@.la + Gegl_@GEGL_MAJOR_VERSION@_@GEGL_MINOR_VERSION@_gir_FILES = $(introspection_sources) + INTROSPECTION_GIRS += Gegl-@GEGL_API_VERSION@.gir +-- +1.8.1.5 + diff --git a/media-libs/gegl/files/gegl-0.2.0-introspection-version.patch b/media-libs/gegl/files/gegl-0.2.0-introspection-version.patch new file mode 100644 index 000000000000..1ac28dc62964 --- /dev/null +++ b/media-libs/gegl/files/gegl-0.2.0-introspection-version.patch @@ -0,0 +1,31 @@ +From 35469116fbf0b398d748f8116e4dcc8bdaee12c7 Mon Sep 17 00:00:00 2001 +From: Jon Nordby <jononor@gmail.com> +Date: Thu, 12 Apr 2012 12:10:05 +0000 +Subject: gobject-introspection: Fix build after 0.2.x version bump + +Remove hardcoding of version numbers so that this does +not happen again. +--- +(limited to 'gegl/Makefile.am') + +diff --git a/gegl/Makefile.am b/gegl/Makefile.am +index aef4c33..43010ce 100644 +--- a/gegl/Makefile.am ++++ b/gegl/Makefile.am +@@ -118,10 +118,10 @@ introspection_sources = \ + INCLUDES = $(AM_CFLAGS) $(AM_CPPFLAGS) + + Gegl-@GEGL_API_VERSION@.gir: libgegl-@GEGL_API_VERSION@.la Makefile +-Gegl_0_1_gir_INCLUDES = GObject-2.0 GLib-2.0 Babl-0.1 +-Gegl_0_1_gir_CFLAGS = $(INCLUDES) +-Gegl_0_1_gir_LIBS = libgegl-@GEGL_API_VERSION@.la +-Gegl_0_1_gir_FILES = $(introspection_sources) ++Gegl_@GEGL_MAJOR_VERSION@_@GEGL_MINOR_VERSION@_gir_INCLUDES = GObject-2.0 GLib-2.0 Babl-0.1 ++Gegl_@GEGL_MAJOR_VERSION@_@GEGL_MINOR_VERSION@_gir_CFLAGS = $(INCLUDES) ++Gegl_@GEGL_MAJOR_VERSION@_@GEGL_MINOR_VERSION@_gir_LIBS = libgegl-@GEGL_API_VERSION@.la ++Gegl_@GEGL_MAJOR_VERSION@_@GEGL_MINOR_VERSION@_gir_FILES = $(introspection_sources) + INTROSPECTION_GIRS += Gegl-@GEGL_API_VERSION@.gir + + girdir = $(datadir)/gir-1.0 +-- +cgit v0.9.1 diff --git a/media-libs/gegl/files/gegl-0.2.0-underlinking.patch b/media-libs/gegl/files/gegl-0.2.0-underlinking.patch new file mode 100644 index 000000000000..53f29c49da7d --- /dev/null +++ b/media-libs/gegl/files/gegl-0.2.0-underlinking.patch @@ -0,0 +1,52 @@ +From bedd95f5f14524360117209ed6a1a83627523f54 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Wed, 10 May 2017 17:33:05 +0200 +Subject: [PATCH] Backport $(MATH_LIB) patch to GEGL 0.2 + +Source: +https://git.gnome.org/browse/gegl/patch/?id=c9bbc815378cb81ba8a48be35f615e7e2d74dffc +--- + bin/Makefile.am | 2 +- + examples/Makefile.am | 2 +- + tools/Makefile.am | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/bin/Makefile.am b/bin/Makefile.am +index c85ecbd..08a156b 100644 +--- a/bin/Makefile.am ++++ b/bin/Makefile.am +@@ -23,7 +23,7 @@ AM_CFLAGS = \ + + AM_LDFLAGS = \ + $(no_undefined) ../gegl/libgegl-$(GEGL_API_VERSION).la \ +- $(DEP_LIBS) $(BABL_LIBS) $(PNG_LIBS) $(LIBSPIRO) ++ $(DEP_LIBS) $(BABL_LIBS) $(PNG_LIBS) $(LIBSPIRO) $(MATH_LIB) + + bin_PROGRAMS = gegl + +diff --git a/examples/Makefile.am b/examples/Makefile.am +index c29a1dd..5c4ac3a 100644 +--- a/examples/Makefile.am ++++ b/examples/Makefile.am +@@ -42,4 +42,4 @@ AM_CFLAGS = $(DEP_CFLAGS) $(GTK_CFLAGS) $(BABL_CFLAGS) $(PNG_CFLAGS) + + AM_LDFLAGS = \ + $(top_builddir)/gegl/libgegl-$(GEGL_API_VERSION).la \ +- $(DEP_LIBS) $(GTK_LIBS) $(BABL_LIBS) $(PNG_LIBS) ++ $(DEP_LIBS) $(GTK_LIBS) $(BABL_LIBS) $(PNG_LIBS) $(MATH_LIB) +diff --git a/tools/Makefile.am b/tools/Makefile.am +index 8f1077d..4dd3845 100644 +--- a/tools/Makefile.am ++++ b/tools/Makefile.am +@@ -22,7 +22,7 @@ AM_CFLAGS = $(DEP_CFLAGS) $(BABL_CFLAGS) + + AM_LDFLAGS = \ + $(top_builddir)/gegl/libgegl-$(GEGL_API_VERSION).la \ +- $(DEP_LIBS) $(BABL_LIBS) ++ $(DEP_LIBS) $(BABL_LIBS) $(MATH_LIB) + + noinst_PROGRAMS = introspect operation_reference img_cmp + +-- +2.12.2 + diff --git a/media-libs/gegl/files/gegl-0.3.12-failing-tests.patch b/media-libs/gegl/files/gegl-0.3.12-failing-tests.patch new file mode 100644 index 000000000000..c886419925af --- /dev/null +++ b/media-libs/gegl/files/gegl-0.3.12-failing-tests.patch @@ -0,0 +1,33 @@ +From e3ffef75aabd2d078cf341124ba42ce7673419b3 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Wed, 22 Mar 2017 19:59:38 +0100 +Subject: [PATCH] Disable failing tests + +https://bugs.gentoo.org/show_bug.cgi?id=595332#c3 +--- + tests/simple/Makefile.am | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/tests/simple/Makefile.am b/tests/simple/Makefile.am +index e28680a..aa7efd8 100644 +--- a/tests/simple/Makefile.am ++++ b/tests/simple/Makefile.am +@@ -15,7 +15,6 @@ noinst_PROGRAMS = \ + test-gegl-rectangle \ + test-gegl-color \ + test-gegl-tile \ +- test-image-compare \ + test-license-check \ + test-misc \ + test-node-connections \ +@@ -23,7 +22,6 @@ noinst_PROGRAMS = \ + test-node-properties \ + test-object-forked \ + test-opencl-colors \ +- test-serialize \ + test-path \ + test-proxynop-processing \ + test-scaled-blit \ +-- +2.12.0 + diff --git a/media-libs/gegl/files/gegl-0.3.14-g_log_domain.patch b/media-libs/gegl/files/gegl-0.3.14-g_log_domain.patch new file mode 100644 index 000000000000..4fb81a2b2bb7 --- /dev/null +++ b/media-libs/gegl/files/gegl-0.3.14-g_log_domain.patch @@ -0,0 +1,47 @@ +From 81fb956b221e4b1f919788d8a5f6a3a5462b86ae Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=C3=98yvind=20Kol=C3=A5s?= <pippin@gimp.org> +Date: Thu, 23 Mar 2017 14:59:28 +0100 +Subject: build: move G_LOG_DOMAIN define to a Makefile.am as suggested in glib + docs... + +--- + configure.ac | 2 -- + gegl/Makefile.am | 2 ++ + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 41ed17e..36e8e2a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1269,8 +1269,6 @@ done + # We should support this at some point if possible + #LDFLAGS="-Wl,-z,defs" + +-CFLAGS="$CFLAGS -DG_LOG_DOMAIN=\\\"GEGL\\\"" +- + dnl bin/node-editors/Makefile + AC_CONFIG_FILES([ + Makefile +diff --git a/gegl/Makefile.am b/gegl/Makefile.am +index 2030ebb..b5f70d8 100644 +--- a/gegl/Makefile.am ++++ b/gegl/Makefile.am +@@ -12,6 +12,7 @@ endif + + SUBDIRS = buffer graph module operation process property-types opencl + ++ + CLEANFILES = + + AM_CPPFLAGS = \ +@@ -31,6 +32,7 @@ AM_CPPFLAGS = \ + -I$(top_builddir)/gegl/property-types \ + -I$(top_srcdir)/gegl/property-types \ + -DLIBDIR=\""$(libdir)"\" \ ++ -DG_LOG_DOMAIN=\"GEGL\" \ + -DGEGL_LOCALEDIR=\""$(GEGL_LOCALEDIR)"\" + + AM_CFLAGS = $(DEP_CFLAGS) $(BABL_CFLAGS) +-- +cgit v0.12 + diff --git a/media-libs/gegl/files/gegl-0.3.14-implicit-declaration.patch b/media-libs/gegl/files/gegl-0.3.14-implicit-declaration.patch new file mode 100644 index 000000000000..0a7943aebc1c --- /dev/null +++ b/media-libs/gegl/files/gegl-0.3.14-implicit-declaration.patch @@ -0,0 +1,37 @@ +From 72905e2865b4f352da7caa8f722b1db77c07a173 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping <sebastian@pipping.org> +Date: Sun, 2 Apr 2017 00:13:54 +0200 +Subject: [PATCH] Apply upstream fixes for implicit function declaration + warnings + +Source commits: +https://git.gnome.org/browse/gegl/commit/tests/simple/test-buffer-sharing.c?id=7cb72e3a9ade11a506e252623bead17635de2047 +https://git.gnome.org/browse/gegl/commit/tests/simple/test-buffer-sharing.c?id=52f01ba49e2246df24a504084863b12794682d37 +--- + tests/simple/test-buffer-sharing.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/tests/simple/test-buffer-sharing.c b/tests/simple/test-buffer-sharing.c +index 94eccda..a52bfa8 100644 +--- a/tests/simple/test-buffer-sharing.c ++++ b/tests/simple/test-buffer-sharing.c +@@ -16,6 +16,7 @@ + */ + + #include <gegl.h> ++#include <glib/gstdio.h> + + // in order of progression + typedef enum _TestState { +@@ -164,6 +165,8 @@ on_timeout(gpointer user_data) { + return FALSE; + } + ++#include <unistd.h> ++ + static void + test_init(TestData *data) { + +-- +2.12.2 + diff --git a/media-libs/gegl/files/gegl-0.3.4-endian.patch b/media-libs/gegl/files/gegl-0.3.4-endian.patch new file mode 100644 index 000000000000..3df13e69ab06 --- /dev/null +++ b/media-libs/gegl/files/gegl-0.3.4-endian.patch @@ -0,0 +1,11 @@ +--- a/operations/external/tiff-load.c ++++ b/operations/external/tiff-load.c +@@ -505,7 +505,7 @@ + GeglRectangle line = { 0, p->height - row - 1, p->width, 1 }; + #if G_BYTE_ORDER != G_LITTLE_ENDIAN + guint row_start = row * p->width; +- guint row end = row * p->width + p->width; ++ guint row_end = row * p->width + p->width; + guint i; + + for (i = row_start; i < row_end; i++) diff --git a/media-libs/gegl/files/gegl-0.3.4-underlinking.patch b/media-libs/gegl/files/gegl-0.3.4-underlinking.patch new file mode 100644 index 000000000000..a7a62909efdc --- /dev/null +++ b/media-libs/gegl/files/gegl-0.3.4-underlinking.patch @@ -0,0 +1,31 @@ +From 8dd23b1ed5f1ce065839f15a21ca28766835f1fd Mon Sep 17 00:00:00 2001 +From: Justin Lecher <jlec@gentoo.org> +Date: Sat, 5 Dec 2015 17:34:48 +0100 +Subject: [PATCH] Fix underlinking (-lm) of libgegl.so + +When linking with ld.gold the builds fails due to underlinking of libgegl.so +./.libs/libgegl-0.3.so: error: undefined reference to 'tanhf' + +Gnome-Bugs: https://bugzilla.gnome.org/show_bug.cgi?id=759065 + +Signed-off-by: Justin Lecher <jlec@gentoo.org> +--- + gegl/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gegl/Makefile.am b/gegl/Makefile.am +index e26099c..e53777d 100644 +--- a/gegl/Makefile.am ++++ b/gegl/Makefile.am +@@ -39,7 +39,7 @@ AM_LDFLAGS = \ + $(no_undefined) -export-dynamic -version-info $(GEGL_LIBRARY_VERSION) + + LIBS = \ +- $(DEP_LIBS) $(BABL_LIBS) ++ $(DEP_LIBS) $(BABL_LIBS) -lm + + GEGL_publicdir = $(includedir)/gegl-$(GEGL_API_VERSION) + +-- +2.6.3 + |