Commit 1b714ca0 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

advapi32: Don't read a value that might be uninitialized (Coverity).

parent bf5b8ae8
...@@ -2118,7 +2118,7 @@ LSTATUS WINAPI RegGetValueW( HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue, ...@@ -2118,7 +2118,7 @@ LSTATUS WINAPI RegGetValueW( HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue,
DWORD dwFlags, LPDWORD pdwType, PVOID pvData, DWORD dwFlags, LPDWORD pdwType, PVOID pvData,
LPDWORD pcbData ) LPDWORD pcbData )
{ {
DWORD dwType, cbData = pcbData ? *pcbData : 0; DWORD dwType, cbData = (pvData && pcbData) ? *pcbData : 0;
PVOID pvBuf = NULL; PVOID pvBuf = NULL;
LONG ret; LONG ret;
...@@ -2214,7 +2214,7 @@ LSTATUS WINAPI RegGetValueA( HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue, ...@@ -2214,7 +2214,7 @@ LSTATUS WINAPI RegGetValueA( HKEY hKey, LPCSTR pszSubKey, LPCSTR pszValue,
DWORD dwFlags, LPDWORD pdwType, PVOID pvData, DWORD dwFlags, LPDWORD pdwType, PVOID pvData,
LPDWORD pcbData ) LPDWORD pcbData )
{ {
DWORD dwType, cbData = pcbData ? *pcbData : 0; DWORD dwType, cbData = (pvData && pcbData) ? *pcbData : 0;
PVOID pvBuf = NULL; PVOID pvBuf = NULL;
LONG ret; LONG ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment