projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
00a64f3
)
[NDIS]
author
Rafal Harabien
<rafalh@reactos.org>
Sat, 26 Mar 2011 15:12:23 +0000
(15:12 +0000)
committer
Rafal Harabien
<rafalh@reactos.org>
Sat, 26 Mar 2011 15:12:23 +0000
(15:12 +0000)
Correct Length value in case string is truncated
svn path=/trunk/; revision=51159
reactos/drivers/network/ndis/ndis/config.c
patch
|
blob
|
history
diff --git
a/reactos/drivers/network/ndis/ndis/config.c
b/reactos/drivers/network/ndis/ndis/config.c
index
b95f1e0
..
f0227c7
100644
(file)
--- a/
reactos/drivers/network/ndis/ndis/config.c
+++ b/
reactos/drivers/network/ndis/ndis/config.c
@@
-841,7
+841,7
@@
NdisOpenConfigurationKeyByIndex(
/* should i fail instead if the passed-in string isn't long enough? */
wcsncpy(KeyName->Buffer, KeyInformation->Name, KeyName->MaximumLength/sizeof(WCHAR));
- KeyName->Length = (USHORT)
KeyInformation->NameLength
;
+ KeyName->Length = (USHORT)
min(KeyInformation->NameLength, KeyName->MaximumLength)
;
InitializeObjectAttributes(&KeyAttributes, KeyName, OBJ_CASE_INSENSITIVE, ConfigurationHandle, NULL);