check NDIS ParameterType (fix by Crashfourit)
Modified: trunk/reactos/drivers/net/ndis/ndis/config.c
_____
Modified: trunk/reactos/drivers/net/ndis/ndis/config.c
--- trunk/reactos/drivers/net/ndis/ndis/config.c 2006-01-23
12:59:30 UTC (rev 21001)
+++ trunk/reactos/drivers/net/ndis/ndis/config.c 2006-01-23
18:15:00 UTC (rev 21002)
@@ -493,8 +493,17 @@
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);
if(*Status != STATUS_SUCCESS)
Show replies by date