From 72928df58f70c833020fdabb81de38df0001e8af Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sat, 12 Mar 2011 20:29:40 +0000 Subject: make XMLNode::add_property() correctly re-entrant and reduce the size of the tmp buffer used to print a long integer git-svn-id: svn://localhost/ardour2/branches/3.0@9131 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/pbd/xml++.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/pbd/xml++.cc') diff --git a/libs/pbd/xml++.cc b/libs/pbd/xml++.cc index dc27b8b1a5..1b006fd63d 100644 --- a/libs/pbd/xml++.cc +++ b/libs/pbd/xml++.cc @@ -406,8 +406,8 @@ XMLNode::add_property(const char* n, const char* v) XMLProperty* XMLNode::add_property(const char* name, const long value) { - static char str[1024]; - snprintf(str, 1024, "%ld", value); + char str[64]; + snprintf(str, sizeof(str), "%ld", value); return add_property(name, str); } -- cgit v1.2.3