Patch to cure recursion by aborting if the co-ordinates are to big to handle (jburgess)
This commit is contained in:
parent
1a03c2d655
commit
946fa51f4f
1 changed files with 6 additions and 0 deletions
|
@ -323,6 +323,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 ((abs(x1) >= INT_MAX/2) || (abs(y1) >= INT_MAX/2) ||
|
||||
(abs(x2) >= INT_MAX/2) || (abs(y2) >= INT_MAX/2))
|
||||
return;
|
||||
|
||||
line(x1, y1, cx, cy);
|
||||
line(cx, cy, x2, y2);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue