mirror of
https://github.com/reactos/reactos.git
synced 2025-06-04 08:50:27 +00:00
- Added check for Atom == 0 in RtlQueryAtomInAtomTable.
- Set error code in one error case of GetDiskFreeSpaceW. - Added call to DC_UnlockDc in one error case of NtGdiBitBlt. svn path=/trunk/; revision=6446
This commit is contained in:
parent
3fa0b64ad8
commit
e0d3016a0f
3 changed files with 18 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $Id: volume.c,v 1.33 2003/10/22 20:06:32 sedwards Exp $
|
||||
/* $Id: volume.c,v 1.34 2003/10/28 17:43:42 navaraf Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
|
@ -242,6 +242,7 @@ GetDiskFreeSpaceW(
|
|||
hFile = InternalOpenDirW(lpRootPathName, FALSE);
|
||||
if (INVALID_HANDLE_VALUE == hFile)
|
||||
{
|
||||
SetLastError(ERROR_PATH_NOT_FOUND);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: atom.c,v 1.6 2003/10/28 09:49:04 navaraf Exp $
|
||||
/* $Id: atom.c,v 1.7 2003/10/28 17:43:42 navaraf Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -579,6 +579,11 @@ RtlQueryAtomInAtomTable(IN PRTL_ATOM_TABLE AtomTable,
|
|||
ULONG Length;
|
||||
PRTL_ATOM_ENTRY AtomEntry;
|
||||
|
||||
if (Atom == 0)
|
||||
{
|
||||
return STATUS_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
if (Atom < 0xC000)
|
||||
{
|
||||
if (RefCount != NULL)
|
||||
|
@ -730,11 +735,11 @@ RtlpCheckIntegerAtom(PWSTR AtomName,
|
|||
RtlInitUnicodeString(&AtomString,
|
||||
p);
|
||||
|
||||
DPRINT1("AtomString: %wZ\n", &AtomString);
|
||||
DPRINT("AtomString: %wZ\n", &AtomString);
|
||||
|
||||
RtlUnicodeStringToInteger(&AtomString,10, &LongValue);
|
||||
|
||||
DPRINT1("LongValue: %lu\n", LongValue);
|
||||
DPRINT("LongValue: %lu\n", LongValue);
|
||||
|
||||
*AtomValue = (USHORT)(LongValue & 0x0000FFFF);
|
||||
|
||||
|
@ -878,7 +883,7 @@ RtlpQueryAtomInformation(PRTL_ATOM_TABLE AtomTable,
|
|||
return Status;
|
||||
}
|
||||
|
||||
DPRINT1("NameLength: %lu\n", NameLength);
|
||||
DPRINT("NameLength: %lu\n", NameLength);
|
||||
|
||||
if (ReturnLength != NULL)
|
||||
{
|
||||
|
@ -916,7 +921,7 @@ RtlpQueryAtomTableInformation(PRTL_ATOM_TABLE AtomTable,
|
|||
Length += ((AtomTable->NumberOfAtoms - 1)* sizeof(RTL_ATOM));
|
||||
}
|
||||
|
||||
DPRINT1("RequiredLength: %lu\n", Length);
|
||||
DPRINT("RequiredLength: %lu\n", Length);
|
||||
|
||||
if (ReturnLength != NULL)
|
||||
{
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: bitmaps.c,v 1.41 2003/10/22 17:44:01 gvg Exp $ */
|
||||
/* $Id: bitmaps.c,v 1.42 2003/10/28 17:43:42 navaraf Exp $ */
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -122,6 +122,11 @@ BOOL STDCALL NtGdiBitBlt(HDC hDCDest,
|
|||
BrushObj = BRUSHOBJ_LockBrush(DCDest->w.hBrush);
|
||||
if (NULL == BrushObj)
|
||||
{
|
||||
if (UsesSource)
|
||||
{
|
||||
DC_UnlockDc(hDCSrc);
|
||||
}
|
||||
DC_UnlockDc(hDCDest);
|
||||
SetLastWin32Error(ERROR_INVALID_HANDLE);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue