fix #4 off-by-1 error in SVG buffer allocation