Changeset 17287


Ignore:
Timestamp:
Jun 24, 2009 6:56:03 AM (7 years ago)
Author:
chaitanya
Message:

Another correction for r17277. Problem arised only in Windows?!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gdal/ogr/ogrsf_frmts/gml/gmlhandler.cpp

    r17278 r17287  
    402402            m_nGeometryDepth = poState->m_nPathLength;
    403403       
    404         if( m_nGeomLen + nLNLenBytes + 4 > m_nGeomAlloc )
    405         {
    406             m_nGeomAlloc = (int) (m_nGeomAlloc * 1.3 + nLNLenBytes + 1000);
     404        char* pszAttributes = GetAttributes(attr);
     405
     406        if( m_nGeomLen + nLNLenBytes + 4 + strlen( pszAttributes ) >
     407                        m_nGeomAlloc )
     408        {
     409            m_nGeomAlloc = (int) (m_nGeomAlloc * 1.3 + nLNLenBytes + 1000 +
     410                                  strlen( pszAttributes ));
    407411            char* pszNewGeometry = (char *)
    408412                VSIRealloc( m_pszGeometry, m_nGeomAlloc);
     
    418422        m_nGeomLen += nLNLenBytes;
    419423        /* saving attributes */
    420         char* pszAttributes = GetAttributes(attr);
    421424        strcat( m_pszGeometry + m_nGeomLen, pszAttributes );
    422425        m_nGeomLen += strlen( pszAttributes );
Note: See TracChangeset for help on using the changeset viewer.