check NDIS ParameterType (fix by Crashfourit)

svn path=/trunk/; revision=21002
This commit is contained in:
Christoph von Wittich 2006-01-23 18:15:00 +00:00
parent b8265505ae
commit 96249aac20

View file

@ -493,7 +493,16 @@ NdisReadConfiguration(
str.Buffer = (PWCHAR)KeyInformation->Data;
(*ParameterValue)->ParameterType = ParameterType;
*Status = RtlUnicodeStringToInteger(&str, 16, &(*ParameterValue)->ParameterData.IntegerData);
/*
If ParameterType is NdisParameterInteger then the base of str is decimal.
If ParameterType is NdisParameterHexInteger then the base of str is hexadecimal.
*/
if (ParameterType == NdisParameterInteger)
*Status = RtlUnicodeStringToInteger(&str, 10, &(*ParameterValue)->ParameterData.IntegerData);
else if (ParameterType == NdisParameterHexInteger)
*Status = RtlUnicodeStringToInteger(&str, 16, &(*ParameterValue)->ParameterData.IntegerData);
ExFreePool(KeyInformation);