mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 01:55:39 +00:00
[APPHELP] Dereference after null check (default_dir). CID 1363509
svn path=/trunk/; revision=71931
This commit is contained in:
parent
02da519230
commit
3fe36f5bb9
1 changed files with 12 additions and 7 deletions
|
@ -472,6 +472,10 @@ BOOL WINAPI SdbGetAppPatchDir(HSDB db, LPWSTR path, DWORD size)
|
||||||
static WCHAR* default_dir = NULL;
|
static WCHAR* default_dir = NULL;
|
||||||
static CONST WCHAR szAppPatch[] = {'\\','A','p','p','P','a','t','c','h',0};
|
static CONST WCHAR szAppPatch[] = {'\\','A','p','p','P','a','t','c','h',0};
|
||||||
|
|
||||||
|
/* In case function fails, path holds empty string */
|
||||||
|
if (size > 0)
|
||||||
|
*path = 0;
|
||||||
|
|
||||||
if (!default_dir)
|
if (!default_dir)
|
||||||
{
|
{
|
||||||
WCHAR* tmp = NULL;
|
WCHAR* tmp = NULL;
|
||||||
|
@ -491,11 +495,12 @@ BOOL WINAPI SdbGetAppPatchDir(HSDB db, LPWSTR path, DWORD size)
|
||||||
if (tmp)
|
if (tmp)
|
||||||
SdbFree(tmp);
|
SdbFree(tmp);
|
||||||
}
|
}
|
||||||
|
if (!default_dir)
|
||||||
|
{
|
||||||
|
SHIM_ERR("Unable to obtain default AppPatch directory\n");
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* In case function fails, path holds empty string */
|
|
||||||
if (size > 0)
|
|
||||||
*path = 0;
|
|
||||||
|
|
||||||
if (!db)
|
if (!db)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue