aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Fabbro <bicatali@gentoo.org>2013-08-06 21:03:53 -0700
committerSébastien Fabbro <bicatali@gentoo.org>2013-08-06 21:03:53 -0700
commite847e78fd3ee987d1b00c67917f702a7ca150c40 (patch)
tree50b4a871709dd12533fadd0689b72eb3a3703819 /x11-libs/agg/files/2.5/0002-Cure-recursion-by-aborting-if-the-co-ordinates-are-t.patch
parentsci-libs/openblas: Version bump (diff)
downloadsci-e847e78fd3ee987d1b00c67917f702a7ca150c40.tar.gz
sci-e847e78fd3ee987d1b00c67917f702a7ca150c40.tar.bz2
sci-e847e78fd3ee987d1b00c67917f702a7ca150c40.zip
x11-libs/agg: Import all fedora patches. Add static-libs flag, switch to EAPI5 and autotools-utils eclass
Package-Manager: portage-2.2.01.22124-prefix
Diffstat (limited to 'x11-libs/agg/files/2.5/0002-Cure-recursion-by-aborting-if-the-co-ordinates-are-t.patch')
-rw-r--r--x11-libs/agg/files/2.5/0002-Cure-recursion-by-aborting-if-the-co-ordinates-are-t.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/x11-libs/agg/files/2.5/0002-Cure-recursion-by-aborting-if-the-co-ordinates-are-t.patch b/x11-libs/agg/files/2.5/0002-Cure-recursion-by-aborting-if-the-co-ordinates-are-t.patch
new file mode 100644
index 000000000..4fe74341e
--- /dev/null
+++ b/x11-libs/agg/files/2.5/0002-Cure-recursion-by-aborting-if-the-co-ordinates-are-t.patch
@@ -0,0 +1,40 @@
+From e269fe9b62af6fe314cebe0ee7a6d6d1a4a84d1c Mon Sep 17 00:00:00 2001
+From: Tom Hughes <tom@compton.nu>
+Date: Sun, 19 May 2013 11:03:26 +0100
+Subject: [PATCH 02/15] Cure recursion by aborting if the co-ordinates are to
+ big to handle
+
+---
+ include/agg_rasterizer_cells_aa.h | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/include/agg_rasterizer_cells_aa.h b/include/agg_rasterizer_cells_aa.h
+index d3bb138..3a616d9 100644
+--- a/include/agg_rasterizer_cells_aa.h
++++ b/include/agg_rasterizer_cells_aa.h
+@@ -40,7 +40,8 @@
+ #define AGG_RASTERIZER_CELLS_AA_INCLUDED
+
+ #include <string.h>
+-#include <math.h>
++#include <cstdlib>
++#include <limits>
+ #include "agg_math.h"
+ #include "agg_array.h"
+
+@@ -333,6 +334,12 @@ namespace agg
+ {
+ int cx = (x1 + x2) >> 1;
+ int cy = (y1 + y2) >> 1;
++
++ // Bail if values are so large they are likely to wrap
++ if ((std::abs(x1) >= std::numeric_limits<int>::max()/2) || (std::abs(y1) >= std::numeric_limits<int>::max()/2) ||
++ (std::abs(x2) >= std::numeric_limits<int>::max()/2) || (std::abs(y2) >= std::numeric_limits<int>::max()/2))
++ return;
++
+ line(x1, y1, cx, cy);
+ line(cx, cy, x2, y2);
+ }
+--
+1.8.1.4
+