occt: master 48a2dd20

Author Committer Branch Timestamp Parent
kgv bugmaster master 2017-11-24 15:37:01 master 15669413
Affected Issues  0029344: Foundation Classes, TCollection_AsciiString - replace confusing strncpy with memcpy
Changeset 0029344: Foundation Classes, TCollection_AsciiString - replace confusing strncpy with memcpy

strncpy() usage within TCollection_AsciiString has been replaced by memcpy()
where string length has been already determined.

TCollection_AsciiString::SetValue() now throws exception
on attempt to set '\0' - TCollection_AsciiString::Trunc() should be used instead.
TCollection_AsciiString(const char* , int ) has been modified to properly set string length
in case of NULL-terminator appeared earlier then specified length.

Interface_LineBuffer has been revised for using NCollection_Array1 instead of TCollection_AsciiString
to avoid misusing TCollection_AsciiString interface.
mod - src/Interface/Interface_LineBuffer.cxx Diff File
mod - src/Interface/Interface_LineBuffer.hxx Diff File
mod - src/TCollection/TCollection_AsciiString.cxx Diff File