- Check for invalid ConfigurationContext

- Patch by Daniel Zimmermann with a slight modification by me

svn path=/trunk/; revision=40764
This commit is contained in:
Cameron Gutman 2009-05-01 19:36:55 +00:00
parent 5a5301ff27
commit 3e8f906b53

View file

@ -337,6 +337,12 @@ NdisReadConfiguration(
NDIS_DbgPrint(MAX_TRACE,("requested read of %wZ\n", Keyword)); NDIS_DbgPrint(MAX_TRACE,("requested read of %wZ\n", Keyword));
if (ConfigurationContext == NULL)
{
NDIS_DbgPrint(MID_TRACE,("invalid parameter ConfigurationContext (0x%x)\n",ConfigurationContext));
return;
}
if( if(
!wcsncmp(Keyword->Buffer, L"Environment", Keyword->Length/sizeof(WCHAR)) && !wcsncmp(Keyword->Buffer, L"Environment", Keyword->Length/sizeof(WCHAR)) &&
wcslen(L"Environment") == Keyword->Length/sizeof(WCHAR) wcslen(L"Environment") == Keyword->Length/sizeof(WCHAR)
@ -907,4 +913,3 @@ NdisOpenConfigurationKeyByName(
*Status = NDIS_STATUS_SUCCESS; *Status = NDIS_STATUS_SUCCESS;
} }