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).
This commit is contained in:
parent
ea08576820
commit
6d652ddc4f
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue