Commit 6d652ddc authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

x11drv: ime: In the update functions if we get a null string with a len report…

x11drv: ime: In the update functions if we get a null string with a len report this and fix len to be 0 (Coverity 656 and 655).
parent ea085768
......@@ -207,6 +207,12 @@ static HIMCC updateCompStr(HIMCC old, LPWSTR compstr, DWORD len)
if (old == NULL && compstr == NULL && len == 0)
return NULL;
if (compstr == NULL && len != 0)
{
ERR("compstr is NULL however we have a len! Please report\n");
len = 0;
}
if (old != NULL)
{
olddata = ImmLockIMCC(old);
......@@ -343,6 +349,12 @@ static HIMCC updateResultStr(HIMCC old, LPWSTR resultstr, DWORD len)
if (old == NULL && resultstr == NULL && len == 0)
return NULL;
if (resultstr == NULL && len != 0)
{
ERR("resultstr is NULL however we have a len! Please report\n");
len = 0;
}
if (old != NULL)
{
olddata = ImmLockIMCC(old);
......
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