Kaydet (Commit) 6d42e7a3 authored tarafından Caolán McNamara's avatar Caolán McNamara

fix out of range access

this is broken since 6e4a21ff
the original commit in 2001.

I imagine the idea was to strip a trailing sal_Unicode(11) from the
end of the string and then recalculate if the string is empty, but
seeing as it has chugged away for the last 12+ years like this I'm
relunctant to change it to what it might have originally been
intended to do and instead just remove the stuff which was never
executed.

Change-Id: I73d5108ece8e716d78a4898117e0ee2d51822015
üst bee397a1
...@@ -464,15 +464,8 @@ namespace svx ...@@ -464,15 +464,8 @@ namespace svx
break; break;
} }
sal_Int32 nDescriptorLen = m_sCompatibleObjectDescription.getLength(); if (!m_sCompatibleObjectDescription.isEmpty())
if (nDescriptorLen) AddFormat(SOT_FORMATSTR_ID_SBA_DATAEXCHANGE);
{
if (m_sCompatibleObjectDescription[nDescriptorLen] == 11)
m_sCompatibleObjectDescription = m_sCompatibleObjectDescription.copy(0, nDescriptorLen - 1);
if (nDescriptorLen)
AddFormat(SOT_FORMATSTR_ID_SBA_DATAEXCHANGE);
}
} }
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment