[PATCH] winhlp32: check hlpfile for being NULL (Coverity)
Marcus Meissner
marcus at jet.franken.de
Sat Jan 31 15:24:51 CST 2009
Hi,
CID 218, hlpfile could be NULL in here, so check
for it before use in the other place too.
Ciao, Marcus
---
programs/winhlp32/winhelp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/programs/winhlp32/winhelp.c b/programs/winhlp32/winhelp.c
index 15e17f6..58c10a9 100644
--- a/programs/winhlp32/winhelp.c
+++ b/programs/winhlp32/winhelp.c
@@ -274,7 +274,7 @@ HLPFILE_WINDOWINFO* WINHELP_GetWindowInfo(HLPFILE* hlpfile, LPCSTR name)
{
strcpy(mwi.type, "primary");
strcpy(mwi.name, "main");
- if (!LoadString(Globals.hInstance, STID_WINE_HELP,
+ if (hlpfile && !LoadString(Globals.hInstance, STID_WINE_HELP,
mwi.caption, sizeof(mwi.caption)))
strcpy(mwi.caption, hlpfile->lpszTitle);
mwi.origin.x = mwi.origin.y = mwi.size.cx = mwi.size.cy = CW_USEDEFAULT;
--
1.5.6
More information about the wine-patches
mailing list