summaryrefslogtreecommitdiff
path: root/src/VBox/Runtime/r3/xml.cpp
diff options
context:
space:
mode:
authorFelix Geyer <debfx-pkg@fobos.de>2011-02-18 14:12:58 +0100
committerFelix Geyer <debfx-pkg@fobos.de>2011-02-18 14:12:58 +0100
commit0eeddfd8dc6b9702278fdefa2dee1d3f465e0ea2 (patch)
treec632a20b5d0e379f5d83c0f476014fe4217e48de /src/VBox/Runtime/r3/xml.cpp
parent14ee89c73b263c9a9e6e5bd300ef05c1ed41742a (diff)
downloadvirtualbox-0eeddfd8dc6b9702278fdefa2dee1d3f465e0ea2.tar.gz
Imported Upstream version 4.0.4-dfsgupstream/4.0.4-dfsg
Diffstat (limited to 'src/VBox/Runtime/r3/xml.cpp')
-rw-r--r--src/VBox/Runtime/r3/xml.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/VBox/Runtime/r3/xml.cpp b/src/VBox/Runtime/r3/xml.cpp
index 32762098b..602917250 100644
--- a/src/VBox/Runtime/r3/xml.cpp
+++ b/src/VBox/Runtime/r3/xml.cpp
@@ -1,4 +1,4 @@
-/* $Id: xml.cpp 35128 2010-12-15 12:38:41Z vboxsync $ */
+/* $Id: xml.cpp $ */
/** @file
* IPRT - XML Manipulation API.
*/
@@ -1097,7 +1097,7 @@ AttributeNode* ElementNode::setAttributePath(const char *pcszName, const iprt::M
*/
AttributeNode* ElementNode::setAttribute(const char *pcszName, int32_t i)
{
- char szValue[10];
+ char szValue[12]; // negative sign + 10 digits + \0
RTStrPrintf(szValue, sizeof(szValue), "%RI32", i);
AttributeNode *p = setAttribute(pcszName, szValue);
return p;
@@ -1116,7 +1116,7 @@ AttributeNode* ElementNode::setAttribute(const char *pcszName, int32_t i)
*/
AttributeNode* ElementNode::setAttribute(const char *pcszName, uint32_t u)
{
- char szValue[10];
+ char szValue[11]; // 10 digits + \0
RTStrPrintf(szValue, sizeof(szValue), "%RU32", u);
AttributeNode *p = setAttribute(pcszName, szValue);
return p;
@@ -1135,7 +1135,7 @@ AttributeNode* ElementNode::setAttribute(const char *pcszName, uint32_t u)
*/
AttributeNode* ElementNode::setAttribute(const char *pcszName, int64_t i)
{
- char szValue[20];
+ char szValue[21]; // negative sign + 19 digits + \0
RTStrPrintf(szValue, sizeof(szValue), "%RI64", i);
AttributeNode *p = setAttribute(pcszName, szValue);
return p;
@@ -1154,7 +1154,7 @@ AttributeNode* ElementNode::setAttribute(const char *pcszName, int64_t i)
*/
AttributeNode* ElementNode::setAttribute(const char *pcszName, uint64_t u)
{
- char szValue[20];
+ char szValue[21]; // 20 digits + \0
RTStrPrintf(szValue, sizeof(szValue), "%RU64", u);
AttributeNode *p = setAttribute(pcszName, szValue);
return p;
@@ -1173,7 +1173,7 @@ AttributeNode* ElementNode::setAttribute(const char *pcszName, uint64_t u)
*/
AttributeNode* ElementNode::setAttributeHex(const char *pcszName, uint32_t u)
{
- char szValue[10];
+ char szValue[11]; // "0x" + 8 digits + \0
RTStrPrintf(szValue, sizeof(szValue), "0x%RX32", u);
AttributeNode *p = setAttribute(pcszName, szValue);
return p;