"James Hawkins" truiken@gmail.com writes:
@@ -341,10 +341,15 @@ UINT WINAPI MsiSourceListGetInfoW( LPCWS } else if (strcmpW(INSTALLPROPERTY_PACKAGENAMEW, szProperty)==0) {
*pcchValue = *pcchValue * sizeof(WCHAR); rc = RegQueryValueExW(sourcekey, INSTALLPROPERTY_PACKAGENAMEW, 0, 0,
(LPBYTE)szValue, pcchValue);
(LPBYTE)szValue, pcchValue); if (rc != ERROR_SUCCESS && rc != ERROR_MORE_DATA) rc = ERROR_SUCCESS;
if (*pcchValue)
*pcchValue = (*pcchValue - 1) / sizeof(WCHAR);
if (szValue)
szValue[*pcchValue] = '\0';
You shouldn't use the results if the registry function failed. Also there isn't much point in checking pcchValue for NULL since you accessed it already.