[ros-diffs] [cwittich] 21002: check NDIS ParameterType (fix by Crashfourit)

cwittich at svn.reactos.org cwittich at svn.reactos.org
Mon Jan 23 19:15:05 CET 2006


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)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20060123/6e0b83ea/attachment.html


More information about the Ros-diffs mailing list