1
Author: Brian Murray <brian@ubuntu.com>
2
Description: Avoid a crash caused by an infinite recursion when
3
drawing extremely long lines. (LP #344849)
5
diff -urNad agg-2.5+dfsg1~/include/agg_rasterizer_cells_aa.h agg-2.5+dfsg1/include/agg_rasterizer_cells_aa.h
6
--- agg-2.5+dfsg1~/include/agg_rasterizer_cells_aa.h 2007-10-10 15:06:16.000000000 -0700
7
+++ agg-2.5+dfsg1/include/agg_rasterizer_cells_aa.h 2009-04-02 18:34:07.000000000 -0700
10
int cx = (x1 + x2) >> 1;
11
int cy = (y1 + y2) >> 1;
13
+ // Bail if values are so large they are likely to wrap
14
+ if ((std::abs(x1) >= std::numeric_limits<int>::max()/2) || (std::abs(y1) >= std::numeric_limits<int>::max()/2) ||
15
+ (std::abs(x2) >= std::numeric_limits<int>::max()/2) || (std::abs(y2) >= std::numeric_limits<int>::max()/2))