VirtualBox

Changeset 35729 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Jan 27, 2011 10:09:34 AM (14 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
69676
Message:

Runtime: extend XML attribute string buffers (fixes dropped CPUID leaf settings in machine XML)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/xml.cpp

    r35128 r35729  
    10981098AttributeNode* ElementNode::setAttribute(const char *pcszName, int32_t i)
    10991099{
    1100     char szValue[10];
     1100    char szValue[12];  // negative sign + 10 digits + \0
    11011101    RTStrPrintf(szValue, sizeof(szValue), "%RI32", i);
    11021102    AttributeNode *p = setAttribute(pcszName, szValue);
     
    11171117AttributeNode* ElementNode::setAttribute(const char *pcszName, uint32_t u)
    11181118{
    1119     char szValue[10];
     1119    char szValue[11];  // 10 digits + \0
    11201120    RTStrPrintf(szValue, sizeof(szValue), "%RU32", u);
    11211121    AttributeNode *p = setAttribute(pcszName, szValue);
     
    11361136AttributeNode* ElementNode::setAttribute(const char *pcszName, int64_t i)
    11371137{
    1138     char szValue[20];
     1138    char szValue[21];  // negative sign + 19 digits + \0
    11391139    RTStrPrintf(szValue, sizeof(szValue), "%RI64", i);
    11401140    AttributeNode *p = setAttribute(pcszName, szValue);
     
    11551155AttributeNode* ElementNode::setAttribute(const char *pcszName, uint64_t u)
    11561156{
    1157     char szValue[20];
     1157    char szValue[21];  // 20 digits + \0
    11581158    RTStrPrintf(szValue, sizeof(szValue), "%RU64", u);
    11591159    AttributeNode *p = setAttribute(pcszName, szValue);
     
    11741174AttributeNode* ElementNode::setAttributeHex(const char *pcszName, uint32_t u)
    11751175{
    1176     char szValue[10];
     1176    char szValue[11];  // "0x" + 8 digits + \0
    11771177    RTStrPrintf(szValue, sizeof(szValue), "0x%RX32", u);
    11781178    AttributeNode *p = setAttribute(pcszName, szValue);
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette