forked from Mirrors/wine-wine
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
ea08576820
commit
6d652ddc4f
|
@ -207,6 +207,12 @@ static HIMCC updateCompStr(HIMCC old, LPWSTR compstr, DWORD len)
|
||||||
if (old == NULL && compstr == NULL && len == 0)
|
if (old == NULL && compstr == NULL && len == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
if (compstr == NULL && len != 0)
|
||||||
|
{
|
||||||
|
ERR("compstr is NULL however we have a len! Please report\n");
|
||||||
|
len = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (old != NULL)
|
if (old != NULL)
|
||||||
{
|
{
|
||||||
olddata = ImmLockIMCC(old);
|
olddata = ImmLockIMCC(old);
|
||||||
|
@ -343,6 +349,12 @@ static HIMCC updateResultStr(HIMCC old, LPWSTR resultstr, DWORD len)
|
||||||
if (old == NULL && resultstr == NULL && len == 0)
|
if (old == NULL && resultstr == NULL && len == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
if (resultstr == NULL && len != 0)
|
||||||
|
{
|
||||||
|
ERR("resultstr is NULL however we have a len! Please report\n");
|
||||||
|
len = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (old != NULL)
|
if (old != NULL)
|
||||||
{
|
{
|
||||||
olddata = ImmLockIMCC(old);
|
olddata = ImmLockIMCC(old);
|
||||||
|
|
Loading…
Reference in New Issue