rewrite janderwald patch for NULL, I see it as pointless using static const WCHAR szNullString[] =

{ '\0' }; to return a null termentate string when u can simple replace it with L'\0' 

svn path=/trunk/; revision=22541
This commit is contained in:
Magnus Olsen 2006-06-23 18:54:53 +00:00
parent f4ef526c52
commit 0673ba6430

View file

@ -57,9 +57,6 @@ static const BYTE crypt32_protectdata_secret[] = {
'w','a','b','b','i','t','s',0
};
static const WCHAR szNullString[] =
{ '\0' };
/*
* The data format returned by the real Windows CryptProtectData seems
* to be something like this:
@ -866,7 +863,7 @@ BOOL WINAPI CryptProtectData(DATA_BLOB* pDataIn,
/* Windows appears to create an empty szDataDescr instead of maintaining
* a NULL */
if (!szDataDescr)
szDataDescr = szNullString;
szDataDescr = L'\0';
/* get crypt context */
if (!CryptAcquireContextW(&hProv,NULL,NULL,CRYPT32_PROTECTDATA_PROV,CRYPT_VERIFYCONTEXT))