fix incorrect use of sizeof() in snprintf (function never actually used in ardour,but ... )
back-port two actual bug fixes from cairocanvas branch