Module: wine Branch: master Commit: 6d652ddc4f2b3ee011031e67e644f28f5d61959c URL: http://source.winehq.org/git/wine.git/?a=commit;h=6d652ddc4f2b3ee011031e67e6...
Author: Aric Stewart aric@codeweavers.com Date: Thu Oct 2 10:43:13 2008 -0500
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).
---
dlls/winex11.drv/ime.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/dlls/winex11.drv/ime.c b/dlls/winex11.drv/ime.c index ab94864..b934035 100644 --- a/dlls/winex11.drv/ime.c +++ b/dlls/winex11.drv/ime.c @@ -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);