projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5760f04
)
check for console handles in Get/SetFileAttributesByHandle()
author
Thomas Bluemel
<thomas@reactsoft.com>
Thu, 25 Aug 2005 00:33:37 +0000
(
00:33
+0000)
committer
Thomas Bluemel
<thomas@reactsoft.com>
Thu, 25 Aug 2005 00:33:37 +0000
(
00:33
+0000)
svn path=/trunk/; revision=17531
reactos/lib/kernel32/file/file.c
patch
|
blob
|
history
diff --git
a/reactos/lib/kernel32/file/file.c
b/reactos/lib/kernel32/file/file.c
index
fb31b65
..
9256f15
100644
(file)
--- a/
reactos/lib/kernel32/file/file.c
+++ b/
reactos/lib/kernel32/file/file.c
@@
-979,6
+979,12
@@
GetFileAttributesByHandle(IN HANDLE hFile,
UNREFERENCED_PARAMETER(dwFlags);
+ if (IsConsoleHandle(hFile))
+ {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
+
Status = NtQueryInformationFile(hFile,
&IoStatusBlock,
&FileBasic,
@@
-1008,6
+1014,12
@@
SetFileAttributesByHandle(IN HANDLE hFile,
NTSTATUS Status;
UNREFERENCED_PARAMETER(dwFlags);
+
+ if (IsConsoleHandle(hFile))
+ {
+ SetLastError(ERROR_INVALID_HANDLE);
+ return FALSE;
+ }
Status = NtQueryInformationFile(hFile,
&IoStatusBlock,