From 7694b9a0a85e2755f1b89c266c1c7cae3b450438 Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Mon, 24 Sep 2007 16:10:40 +0000 Subject: Fixed unsafe hardcoding of buffer size (bzr r3791) --- src/gradient-context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gradient-context.cpp') diff --git a/src/gradient-context.cpp b/src/gradient-context.cpp index f83625abe..3f643b2a9 100644 --- a/src/gradient-context.cpp +++ b/src/gradient-context.cpp @@ -297,7 +297,7 @@ sp_gradient_context_add_stop_near_point (SPGradientContext *rc, SPItem *item, N guint32 cnew = average_color (c1, c2, (offset - prev_stop->offset) / (next_stop->offset - prev_stop->offset)); Inkscape::CSSOStringStream os; gchar c[64]; - sp_svg_write_color (c, 64, cnew); + sp_svg_write_color (c, sizeof(c), cnew); gdouble opacity = (gdouble) SP_RGBA32_A_F (cnew); os << "stop-color:" << c << ";stop-opacity:" << opacity <<";"; SP_OBJECT_REPR (newstop)->setAttribute("style", os.str().c_str()); -- cgit v1.2.3