Fix overflow within libgnomecanvas when passing in a coordinate > INT_MAX. Fixes...
authorCarl Hetherington <carl@carlh.net>
Fri, 1 Oct 2010 20:16:29 +0000 (20:16 +0000)
committerCarl Hetherington <carl@carlh.net>
Fri, 1 Oct 2010 20:16:29 +0000 (20:16 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7864 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/automation_time_axis.cc

index ba76f68e18dfdcca621ab361da63502af654d43d..6c67d2f8feed20fad5f8620d3ebf63ab57ad9221 100644 (file)
@@ -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 */