Change-Id: I397ec6549590d1d4943417356577e8b03ea1d292
Signed-off-by: Hokwon Song <hokwon.song@samsung.com>
_GsmEncodingCore::DecodeN(const byte* pSrc, int srcLength, int& retLength)
{
// 0 in GSM is mapped to 0x40 ['@'] in UNICODE, following code is to handle terminating null.
- if (srcLength > 1 && pSrc && pSrc[srcLength - 1] == '\0')
+ if (srcLength > 1 && pSrc[srcLength - 1] == '\0')
{
--srcLength;
}
byte* pGsmByte = (byte*) pSrc;
wchar_t* pCurrPos = pDst.get();
int index = 0;
- while (srcLength > 0)
+ while (srcLength > 0 && pGsmByte != null)
{
*pCurrPos = GSM_UNICODE_TABLE[*pGsmByte];
if (*pGsmByte == 0x001B)