projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e88d25
)
Prohibit an empty name in RtlSetEnvironmentVariable
author
Jeffrey Morlan
<mrnobo1024@yahoo.com>
Tue, 26 Aug 2008 14:45:37 +0000
(14:45 +0000)
committer
Jeffrey Morlan
<mrnobo1024@yahoo.com>
Tue, 26 Aug 2008 14:45:37 +0000
(14:45 +0000)
svn path=/trunk/; revision=35671
reactos/lib/rtl/env.c
patch
|
blob
|
history
diff --git
a/reactos/lib/rtl/env.c
b/reactos/lib/rtl/env.c
index
cdce037
..
2e437f7
100644
(file)
--- a/
reactos/lib/rtl/env.c
+++ b/
reactos/lib/rtl/env.c
@@
-282,6
+282,10
@@
RtlSetEnvironmentVariable(PWSTR *Environment,
DPRINT("RtlSetEnvironmentVariable(Environment %p Name %wZ Value %wZ)\n",
Environment, Name, Value);
+ /* Variable name must not be empty */
+ if (Name->Length < sizeof(WCHAR))
+ return STATUS_INVALID_PARAMETER;
+
/* Variable names can't contain a '=' except as a first character. */
for (wcs = Name->Buffer + 1;
wcs < Name->Buffer + (Name->Length / sizeof(WCHAR));