gegl02:add repo
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Licensed under the GNU General Public License, version 3.
|
||||
# See the file http://www.gnu.org/licenses/gpl.txt
|
||||
|
||||
from pisi.actionsapi import shelltools
|
||||
from pisi.actionsapi import autotools
|
||||
from pisi.actionsapi import pisitools
|
||||
from pisi.actionsapi import get
|
||||
|
||||
def setup():
|
||||
#autotools.autoreconf("-vfi")
|
||||
autotools.configure("--enable-mmx \
|
||||
--enable-sse \
|
||||
--includedir=/usr/include \
|
||||
--datadir=/usr/share \
|
||||
--with-pic \
|
||||
--with-gio \
|
||||
--with-gtk \
|
||||
--with-cairo \
|
||||
--with-pango \
|
||||
--with-pangocairo \
|
||||
--with-gdk-pixbuf \
|
||||
--with-lensfun \
|
||||
--with-libjpeg \
|
||||
--with-libpng \
|
||||
--with-openexr \
|
||||
--with-sdl \
|
||||
--with-libopenraw \
|
||||
--with-jasper \
|
||||
--with-lua \
|
||||
--without-libavformat \
|
||||
--with-libv4l \
|
||||
--with-libspiro \
|
||||
--with-exiv2 \
|
||||
--with-umfpack \
|
||||
--disable-static \
|
||||
--disable-gtk-doc \
|
||||
--enable-gtk-doc-html=no \
|
||||
--disable-docs \
|
||||
--disable-workshop")
|
||||
#--with-librsvg \
|
||||
#--with-graphviz \
|
||||
|
||||
pisitools.dosed("libtool", " -shared ", " -Wl,-O1,--as-needed -shared ")
|
||||
|
||||
def build():
|
||||
autotools.make()
|
||||
|
||||
# disabled due sandbox violations
|
||||
#def check():
|
||||
# autotools.make("check")
|
||||
|
||||
def install():
|
||||
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
|
||||
|
||||
pisitools.dodoc("AUTHORS", "ChangeLog", "COPYING", "COPYING.LESSER", "NEWS", "README")
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -0,0 +1,11 @@
|
||||
--- operations/external/ff-load.c.orig 2012-04-01 13:17:57.000000000 +0200
|
||||
+++ operations/external/ff-load.c 2012-07-11 12:42:05.174756560 +0200
|
||||
@@ -271,7 +271,7 @@
|
||||
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, NULL);
|
||||
if (err < 0)
|
||||
{
|
||||
print_error (o->path, err);
|
||||
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>gegl02</Name>
|
||||
<Homepage>http://gegl.org</Homepage>
|
||||
<Packager>
|
||||
<Name>PisiLinux Community</Name>
|
||||
<Email>admins@pisilinux.org</Email>
|
||||
</Packager>
|
||||
<License>GPLv3+</License>
|
||||
<License>LGPLv3+</License>
|
||||
<IsA>library</IsA>
|
||||
<IsA>app:console</IsA>
|
||||
<Summary>A graph based image processing framework</Summary>
|
||||
<Description>gegl (Generic Graphics Library) provides infrastructure to do demand based cached non destructive image editing on larger than RAM buffers. Through babl it provides support for a wide range of color models and pixel storage formats for input and output.</Description>
|
||||
<Archive sha1sum="764cc66cb3c7b261b8fc18a6268a0e264a91d573" type="tarbz2">http://ftp.gimp.org/pub/gegl/0.2/gegl-0.2.0.tar.bz2</Archive>
|
||||
<BuildDependencies>
|
||||
<!--<Dependency>SuiteSparse-devel</Dependency>-->
|
||||
<!--<Dependency>libopenraw-devel</Dependency>-->
|
||||
<Dependency>libspiro-devel</Dependency>
|
||||
<Dependency>json-glib-devel</Dependency>
|
||||
<Dependency>openexr-devel</Dependency>
|
||||
<Dependency>ffmpeg-devel</Dependency>
|
||||
<Dependency>libsdl-devel</Dependency>
|
||||
<Dependency>libv4l-devel</Dependency>
|
||||
<Dependency>jasper-devel</Dependency>
|
||||
<Dependency>cairo-devel</Dependency>
|
||||
<Dependency>pango-devel</Dependency>
|
||||
<Dependency>exiv2-devel</Dependency>
|
||||
<Dependency>babl-devel</Dependency>
|
||||
<Dependency>libjpeg-turbo-devel</Dependency>
|
||||
<Dependency>gtk2-devel</Dependency>
|
||||
<Dependency>lua-devel</Dependency>
|
||||
<Dependency>asciidoc</Dependency>
|
||||
<Dependency>intltool</Dependency>
|
||||
<!--<Dependency>graphviz</Dependency>-->
|
||||
<!--<Dependency>enscript</Dependency>-->
|
||||
<Dependency>ruby</Dependency>
|
||||
<Dependency>ilmbase-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<Patch level="1">gegl-0.2.0-cve-2012-4433-1e92e523.patch</Patch>
|
||||
<Patch level="1">gegl-0.2.0-cve-2012-4433-4757cdf7.patch</Patch>
|
||||
<Patch level="0">gegl-0.2.0-ffmpeg-0.11.patch</Patch>
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>gegl02</Name>
|
||||
<RuntimeDependencies>
|
||||
<Dependency>glib2</Dependency>
|
||||
<Dependency>gdk-pixbuf</Dependency>
|
||||
<Dependency>libspiro</Dependency>
|
||||
<Dependency>jasper</Dependency>
|
||||
<Dependency>libpng</Dependency>
|
||||
<Dependency>libsdl</Dependency>
|
||||
<Dependency>cairo</Dependency>
|
||||
<Dependency>pango</Dependency>
|
||||
<Dependency>babl</Dependency>
|
||||
<Dependency>libjpeg-turbo</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="executable">/usr/bin</Path>
|
||||
<Path fileType="library">/usr/lib</Path>
|
||||
<Path fileType="doc">/usr/share/doc</Path>
|
||||
<Path fileType="localedata">/usr/share/locale/</Path>
|
||||
</Files>
|
||||
</Package>
|
||||
|
||||
<Package>
|
||||
<Name>gegl02-devel</Name>
|
||||
<Summary>Development files for gegl02</Summary>
|
||||
<RuntimeDependencies>
|
||||
<Dependency release="current">gegl02</Dependency>
|
||||
<Dependency>glib2-devel</Dependency>
|
||||
<Dependency>babl-devel</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="header">/usr/include</Path>
|
||||
<Path fileType="data">/usr/lib/pkgconfig</Path>
|
||||
<Path fileType="doc">/usr/share/gtk-doc/html</Path>
|
||||
</Files>
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="1">
|
||||
<Date>2014-12-20</Date>
|
||||
<Version>0.2.0</Version>
|
||||
<Comment>First release</Comment>
|
||||
<Name>Osman Erkan</Name>
|
||||
<Email>osman.erkan@pisilinux.org</Email>
|
||||
</Update>
|
||||
</History>
|
||||
</PISI>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" ?>
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>gegl02</Name>
|
||||
<Summary xml:lang="tr">Graf tabanlı resim işleme altyapısı</Summary>
|
||||
<Description xml:lang="tr">gegl02, orijinal kopyaya zarar vermeden (non-destructive) isteğe bağlı (demand based) resim işleme altyapısı sunan bir kütüphanedir.</Description>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>gegl02-devel</Name>
|
||||
<Summary xml:lang="tr">gegl02 için geliştirme dosyaları</Summary>
|
||||
</Package>
|
||||
</PISI>
|
||||
Reference in New Issue
Block a user