Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

set (TK_UTIL_MAJOR_VERSION "6")
set (TK_UTIL_MINOR_VERSION "14")
set (TK_UTIL_RELEASE_VERSION "0")
set (TK_UTIL_RELEASE_VERSION "1")
set (TK_UTIL_VERSION ${TK_UTIL_MAJOR_VERSION}.${TK_UTIL_MINOR_VERSION}.${TK_UTIL_RELEASE_VERSION})

set (TK_UTIL_SCRIPTING_MAJOR_VERSION ${TK_UTIL_MAJOR_VERSION})
Expand Down
16 changes: 9 additions & 7 deletions src/TkUtil/UnicodeString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,7 @@ bool UnicodeString::operator == (const UnicodeString& toCompare) const
if (length ( ) != toCompare.length ( ))
return false;

return 0 == memcmp (unicode ( ), toCompare.unicode ( ),
length ( ) * sizeof (WChar_t));
return 0 == memcmp (unicode ( ), toCompare.unicode ( ), length ( ) * sizeof (WChar_t));
} // UnicodeString::operator ==


Expand Down Expand Up @@ -889,7 +888,8 @@ void UnicodeString::copy (const UnicodeString& str)
_length = str.length ( );
_string = new WChar_t [_length + 1];
CHECK_NULL_PTR_ERROR (_string)
memcpy (_string, str.unicode ( ), _length * sizeof (WChar_t));
if (0 != unicode ( )) // v 6.14.1
memcpy (_string, str.unicode ( ), _length * sizeof (WChar_t));
_string [_length] = 0;
} // UnicodeString::copy

Expand All @@ -903,7 +903,8 @@ void UnicodeString::copy (const WChar_t* str)
_length = stringLength (str);
_string = new WChar_t [_length + 1];
CHECK_NULL_PTR_ERROR (_string)
memcpy (_string, str, _length * sizeof (WChar_t));
if (0 != unicode ( )) // v 6.14.1
memcpy (_string, str, _length * sizeof (WChar_t));
_string [_length] = 0;
} // UnicodeString::copy

Expand Down Expand Up @@ -942,9 +943,10 @@ UnicodeString operator + (const UnicodeString& us1, const UnicodeString& us2)
const size_t length = us1.length ( ) + us2.length ( );
WChar_t* str = new WChar_t [length + 1];
CHECK_NULL_PTR_ERROR (str)
memcpy (str, us1.unicode ( ), us1.length ( ) * sizeof (WChar_t));
memcpy (str + us1.length ( ), us2.unicode ( ),
us2.length ( ) * sizeof (WChar_t));
if (0 != us1.unicode ( )) // v 6.14.1
memcpy (str, us1.unicode ( ), us1.length ( ) * sizeof (WChar_t));
if (0 != us2.unicode ( )) // v 6.14.1
memcpy (str + us1.length ( ), us2.unicode ( ), us2.length ( ) * sizeof (WChar_t));
str [length] = 0;

UnicodeString us (str);
Expand Down
6 changes: 6 additions & 0 deletions versions.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Version 6.14.1 : 20/02/26
=================

Correctif UnicodeString, appels à memcpy, mis en évidence par GNU et LLVM sanitizer lorsque la chaîne est nulle.


Version 6.14.0 : 07/11/25
=================

Expand Down