projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a21f22e
)
[WIN32K]
author
Thomas Faber
<thomas.faber@reactos.org>
Fri, 25 Apr 2014 12:34:17 +0000
(12:34 +0000)
committer
Thomas Faber
<thomas.faber@reactos.org>
Fri, 25 Apr 2014 12:34:17 +0000
(12:34 +0000)
- Avoid assigning a nonvolatile variable inside a try block. Spotted by Timo.
CORE-8094
svn path=/trunk/; revision=62965
reactos/win32ss/user/ntuser/winsta.c
patch
|
blob
|
history
diff --git
a/reactos/win32ss/user/ntuser/winsta.c
b/reactos/win32ss/user/ntuser/winsta.c
index
fdadc21
..
f4fe81a
100644
(file)
--- a/
reactos/win32ss/user/ntuser/winsta.c
+++ b/
reactos/win32ss/user/ntuser/winsta.c
@@
-736,6
+736,9
@@
NtUserGetObjectInformation(
}
Exit:
+ if (Status == STATUS_SUCCESS && nLength < nDataSize)
+ Status = STATUS_BUFFER_TOO_SMALL;
+
_SEH2_TRY
{
if (nLengthNeeded)
@@
-745,10
+748,7
@@
Exit:
if (Status == STATUS_SUCCESS)
{
TRACE("Trying to copy data to caller (len = %lu, len needed = %lu)\n", nLength, nDataSize);
- if (nLength >= nDataSize)
- RtlCopyMemory(pvInformation, pvData, nDataSize);
- else
- Status = STATUS_BUFFER_TOO_SMALL;
+ RtlCopyMemory(pvInformation, pvData, nDataSize);
}
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)