Details
-
Bug
-
Resolution: Fixed
-
Major
-
2.5.1
-
None
-
None
Description
protected string DecodeString(byte[] buffer, int offset, int length) |
{
|
var result = string.Empty; |
if (buffer != null && buffer.Length > 0 && length > 0) |
{
|
result = Encoding.UTF8.GetString(buffer, offset, length);
|
}
|
return result; |
}
|
When a null string is inserted with the Encode method the decodeString method used by Decode transform it in emptyString.
So the Encode / Decode is not idempotent for the strings
maybe is better to use string result= null instead of var result = string.Empty;