summaryrefslogtreecommitdiff
path: root/gtk2_ardour/automation_time_axis.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-10-01 20:16:29 +0000
committerCarl Hetherington <carl@carlh.net>2010-10-01 20:16:29 +0000
commitfd2a9ccdad2a4612982d9f2fa74ac5d2162a8b4f (patch)
treea74056bf120762632fbfb68e1166415263184682 /gtk2_ardour/automation_time_axis.cc
parentcc9dabf882fde398a68ae37f5367cebed20136f2 (diff)
Fix overflow within libgnomecanvas when passing in a coordinate > INT_MAX. Fixes #3370.
git-svn-id: svn://localhost/ardour2/branches/3.0@7864 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/automation_time_axis.cc')
-rw-r--r--gtk2_ardour/automation_time_axis.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk2_ardour/automation_time_axis.cc b/gtk2_ardour/automation_time_axis.cc
index ba76f68e18..6c67d2f8fe 100644
--- a/gtk2_ardour/automation_time_axis.cc
+++ b/gtk2_ardour/automation_time_axis.cc
@@ -92,7 +92,10 @@ AutomationTimeAxisView::AutomationTimeAxisView (Session* s, boost::shared_ptr<Ro
_base_rect = new SimpleRect(*_canvas_display);
_base_rect->property_x1() = 0.0;
_base_rect->property_y1() = 0.0;
- _base_rect->property_x2() = LONG_MAX - 2;
+ /** gnomecanvas sometimes converts this value to int or adds 2 to it, so it must be
+ set correctly to avoid overflow.
+ */
+ _base_rect->property_x2() = INT_MAX - 2;
_base_rect->property_outline_color_rgba() = ARDOUR_UI::config()->canvasvar_AutomationTrackOutline.get();
/* outline ends and bottom */