Paul Vriens : msctf: Fix a possible NULL dereference (Coverity).
Alexandre Julliard
julliard at winehq.org
Fri Jun 5 08:56:52 CDT 2009
Module: wine
Branch: master
Commit: e42d7f95910d5d5322919baf29be8cacfd46a5bb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e42d7f95910d5d5322919baf29be8cacfd46a5bb
Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date: Fri Jun 5 09:20:27 2009 +0200
msctf: Fix a possible NULL dereference (Coverity).
---
dlls/msctf/range.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/msctf/range.c b/dlls/msctf/range.c
index 8b1f482..dc9eae1 100644
--- a/dlls/msctf/range.c
+++ b/dlls/msctf/range.c
@@ -349,11 +349,13 @@ HRESULT Range_Constructor(ITfContext *context, ITextStoreACP *textstore, DWORD l
HRESULT TF_SELECTION_to_TS_SELECTION_ACP(const TF_SELECTION *tf, TS_SELECTION_ACP *tsAcp)
{
- Range *This = (Range *)tf->range;
+ Range *This;
if (!tf || !tsAcp || !tf->range)
return E_INVALIDARG;
+ This = (Range *)tf->range;
+
tsAcp->acpStart = This->anchorStart;
tsAcp->acpEnd = This->anchorEnd;
tsAcp->style.ase = tf->style.ase;
More information about the wine-cvs
mailing list