diff options
author | Kyle Guinn <elyk03@gmail.com> | 2012-05-29 19:14:10 -0400 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2012-06-03 15:21:12 -0500 |
commit | 4d80a1caa74e63debe3234358252c46bf7982024 (patch) | |
tree | f3ff85833115b957e2d851d1cba0c671058465ac /multimedia/gnash/patch | |
parent | 3359bbdb4a1e56448e81a53a1ea9cafb1ed92eb6 (diff) | |
download | slackbuilds-4d80a1caa74e63debe3234358252c46bf7982024.tar.gz |
multimedia/gnash: Added (SWF movie player)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'multimedia/gnash/patch')
-rw-r--r-- | multimedia/gnash/patch/gnash-0.8.10-cve-2012-1175.patch | 63 | ||||
-rw-r--r-- | multimedia/gnash/patch/gnash-0.8.10-kde4-libdir.patch | 12 | ||||
-rw-r--r-- | multimedia/gnash/patch/gnash-0.8.10-klash.patch | 12 |
3 files changed, 87 insertions, 0 deletions
diff --git a/multimedia/gnash/patch/gnash-0.8.10-cve-2012-1175.patch b/multimedia/gnash/patch/gnash-0.8.10-cve-2012-1175.patch new file mode 100644 index 0000000000..9a218d9216 --- /dev/null +++ b/multimedia/gnash/patch/gnash-0.8.10-cve-2012-1175.patch @@ -0,0 +1,63 @@ +From bb4dc77eecb6ed1b967e3ecbce3dac6c5e6f1527 Mon Sep 17 00:00:00 2001 +From: Benjamin Wolsey <bwy@benjaminwolsey.de> +Date: Sat, 10 Mar 2012 14:52:50 +0000 +Subject: Fix crash in GnashImage.cpp + +--- +diff --git a/libbase/GnashImage.cpp b/libbase/GnashImage.cpp +index 11c6956..03a6939 100644 +--- a/libbase/GnashImage.cpp ++++ b/libbase/GnashImage.cpp +@@ -26,6 +26,7 @@ + #include <boost/scoped_array.hpp> + #include <boost/shared_ptr.hpp> + #include <algorithm> ++#include <cassert> + + #ifdef USE_PNG + # include "GnashImagePng.h" +@@ -44,6 +45,21 @@ namespace image { + + namespace { + void processAlpha(GnashImage::iterator imageData, size_t pixels); ++ bool checkValidSize(size_t width, size_t height, size_t channels) { ++ ++ if (width == 0 || height == 0) return false; ++ ++ assert(channels > 0); ++ ++ boost::uint32_t maxSize = std::numeric_limits<boost::int32_t>::max(); ++ if (width >= maxSize || height >= maxSize) return false; ++ ++ maxSize /= channels; ++ maxSize /= width; ++ maxSize /= height; ++ ++ return maxSize > 0; ++ } + } + + GnashImage::GnashImage(iterator data, size_t width, size_t height, +@@ -55,6 +71,8 @@ GnashImage::GnashImage(iterator data, size_t width, size_t height, + _height(height), + _data(data) + { ++ // Callers should check dimensions ++ assert(checkValidSize(_width, _height, channels())); + } + + /// Create an image allocating a buffer of height*pitch bytes +@@ -66,8 +84,9 @@ GnashImage::GnashImage(size_t width, size_t height, ImageType type, + _width(width), + _height(height) + { +- const size_t max = std::numeric_limits<boost::int32_t>::max(); +- if (size() > max) { ++ // Constructed from external input, so restrict dimensions to avoid ++ // overflow in size calculations ++ if (!checkValidSize(_width, _height, channels())) { + throw std::bad_alloc(); + } + _data.reset(new value_type[size()]); +-- +cgit v0.9.0.2 diff --git a/multimedia/gnash/patch/gnash-0.8.10-kde4-libdir.patch b/multimedia/gnash/patch/gnash-0.8.10-kde4-libdir.patch new file mode 100644 index 0000000000..b3279441d2 --- /dev/null +++ b/multimedia/gnash/patch/gnash-0.8.10-kde4-libdir.patch @@ -0,0 +1,12 @@ +diff -ur a/macros/kde4.m4 b/macros/kde4.m4 +--- a/macros/kde4.m4 2011-02-26 19:11:08.000000000 +0100 ++++ b/macros/kde4.m4 2011-11-25 18:09:25.000000000 +0100 +@@ -198,7 +198,7 @@ + if test -d ${KDE4_PREFIX}/lib64 -a -f /etc/redhat-release; then + KDE4_PLUGINDIR="${KDE4_PREFIX}/lib64/kde4" + else +- KDE4_PLUGINDIR="${KDE4_PREFIX}/lib/kde4" ++ KDE4_PLUGINDIR="${KDE4_PREFIX}/${acl_libdirstem}/kde4" + fi + fi + if test x"${with_kde4_servicesdir}" != x ; then diff --git a/multimedia/gnash/patch/gnash-0.8.10-klash.patch b/multimedia/gnash/patch/gnash-0.8.10-klash.patch new file mode 100644 index 0000000000..e6afec04d2 --- /dev/null +++ b/multimedia/gnash/patch/gnash-0.8.10-klash.patch @@ -0,0 +1,12 @@ +diff -ur a/macros/kde4.m4 b/macros/kde4.m4 +--- a/macros/kde4.m4 2011-02-26 19:11:08.000000000 +0100 ++++ b/macros/kde4.m4 2011-03-21 00:04:38.845997945 +0100 +@@ -210,7 +210,7 @@ + KDE4_CONFIGDIR="${KDE4_PREFIX}/share/kde4/config" + fi + if test x"${KDE4_APPSDATADIR}" = x ; then +- KDE4_APPSDATADIR="${KDE4_PREFIX}/share/kde4/apps/klash" ++ KDE4_APPSDATADIR="${KDE4_PREFIX}/share/apps/klash" + fi + + if test x"${ac_cv_path_kde4_incl}" != x ; then |