make XMLNode::add_property() correctly re-entrant and reduce the size of the tmp...
authorPaul Davis <paul@linuxaudiosystems.com>
Sat, 12 Mar 2011 20:29:40 +0000 (20:29 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Sat, 12 Mar 2011 20:29:40 +0000 (20:29 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@9131 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/pbd/xml++.cc

index dc27b8b1a5e0259d4ffd1f59d6ad0754a75e897c..1b006fd63d4f7677fff92fc5532c4fcb82a53982 100644 (file)
@@ -406,8 +406,8 @@ XMLNode::add_property(const char* n, const char* v)
 XMLProperty*
 XMLNode::add_property(const char* name, const long value)
 {
 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);
 }
 
        return add_property(name, str);
 }