Marcus Meissner : gameux: Revert NULL ptr check and deref (Coverity).
Module: wine Branch: master Commit: 4e4aeeadafce90336a6f8d6208d2f62ec852e39b URL: http://source.winehq.org/git/wine.git/?a=commit;h=4e4aeeadafce90336a6f8d6208... Author: Marcus Meissner <marcus(a)jet.franken.de> Date: Sun Jun 26 16:54:14 2011 +0200 gameux: Revert NULL ptr check and deref (Coverity). --- dlls/gameux/gamestatistics.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/gameux/gamestatistics.c b/dlls/gameux/gamestatistics.c index 65aa0f7..70d909e 100644 --- a/dlls/gameux/gamestatistics.c +++ b/dlls/gameux/gamestatistics.c @@ -819,12 +819,13 @@ static HRESULT WINAPI GameStatisticsImpl_GetCategoryTitle( TRACE("%p, %d, %p\n", This, categoryIndex, pTitle); + if(!pTitle) + return E_INVALIDARG; *pTitle = NULL; - if(!pTitle || categoryIndex >= MAX_CATEGORIES) + if (categoryIndex >= MAX_CATEGORIES) hr = E_INVALIDARG; - if(SUCCEEDED(hr)) { nLength = lstrlenW(This->stats.categories[categoryIndex].sName);
participants (1)
-
Alexandre Julliard