mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 00:55:48 +00:00
* check parameters in CreateAcceleratorTableA/W and DestroyAcceleratorTable
svn path=/trunk/; revision=23142
This commit is contained in:
parent
adbc8e954a
commit
78bc2ae282
1 changed files with 7 additions and 0 deletions
|
@ -187,6 +187,9 @@ BOOL WINAPI DestroyAcceleratorTable(HACCEL hAccel)
|
||||||
U32_ACCEL_CACHE_ENTRY ** ppEntry;
|
U32_ACCEL_CACHE_ENTRY ** ppEntry;
|
||||||
ULONG_PTR nUsage = 0;
|
ULONG_PTR nUsage = 0;
|
||||||
|
|
||||||
|
if (!hAccel)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
EnterCriticalSection(&U32AccelCacheLock);
|
EnterCriticalSection(&U32AccelCacheLock);
|
||||||
|
|
||||||
/* see if this accelerator table has been cached */
|
/* see if this accelerator table has been cached */
|
||||||
|
@ -281,6 +284,8 @@ int WINAPI CopyAcceleratorTableW
|
||||||
*/
|
*/
|
||||||
HACCEL WINAPI CreateAcceleratorTableW(LPACCEL lpaccl, int cEntries)
|
HACCEL WINAPI CreateAcceleratorTableW(LPACCEL lpaccl, int cEntries)
|
||||||
{
|
{
|
||||||
|
if (!cEntries || !lpaccl) return (HACCEL)0;
|
||||||
|
|
||||||
return NtUserCreateAcceleratorTable(lpaccl, cEntries);
|
return NtUserCreateAcceleratorTable(lpaccl, cEntries);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -326,6 +331,8 @@ HACCEL WINAPI CreateAcceleratorTableA(LPACCEL lpaccl, int cEntries)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (!cEntries || !lpaccl) return (HACCEL)0;
|
||||||
|
|
||||||
for(i = 0; i < cEntries; ++ i)
|
for(i = 0; i < cEntries; ++ i)
|
||||||
if(!lpaccl[i].fVirt)
|
if(!lpaccl[i].fVirt)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue