Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
de72f405
Commit
de72f405
authored
Oct 28, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
Oct 29, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Add some input parameter checks to GetNumberOfEventLogRecords.
parent
215ca8a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
eventlog.c
dlls/advapi32/eventlog.c
+12
-1
eventlog.c
dlls/advapi32/tests/eventlog.c
+0
-5
No files found.
dlls/advapi32/eventlog.c
View file @
de72f405
...
...
@@ -265,7 +265,18 @@ BOOL WINAPI GetNumberOfEventLogRecords( HANDLE hEventLog, PDWORD NumberOfRecords
{
FIXME
(
"(%p,%p) stub
\n
"
,
hEventLog
,
NumberOfRecords
);
if
(
!
NumberOfRecords
)
return
FALSE
;
if
(
!
NumberOfRecords
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
!
hEventLog
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
*
NumberOfRecords
=
0
;
return
TRUE
;
...
...
dlls/advapi32/tests/eventlog.c
View file @
de72f405
...
...
@@ -158,25 +158,20 @@ static void test_count(void)
SetLastError
(
0xdeadbeef
);
ret
=
GetNumberOfEventLogRecords
(
NULL
,
NULL
);
ok
(
!
ret
,
"Expected failure
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
count
=
0xdeadbeef
;
ret
=
GetNumberOfEventLogRecords
(
NULL
,
&
count
);
todo_wine
{
ok
(
!
ret
,
"Expected failure
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Expected ERROR_INVALID_HANDLE, got %d
\n
"
,
GetLastError
());
ok
(
count
==
0xdeadbeef
,
"Expected count to stay unchanged
\n
"
);
}
handle
=
OpenEventLogA
(
NULL
,
"Application"
);
SetLastError
(
0xdeadbeef
);
ret
=
GetNumberOfEventLogRecords
(
handle
,
NULL
);
ok
(
!
ret
,
"Expected failure
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
count
=
0xdeadbeef
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment