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
78452960
Commit
78452960
authored
Oct 29, 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 GetOldestEventLogRecord.
parent
1fe325fd
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 @
78452960
...
...
@@ -300,7 +300,18 @@ BOOL WINAPI GetOldestEventLogRecord( HANDLE hEventLog, PDWORD OldestRecord )
{
FIXME
(
"(%p,%p) stub
\n
"
,
hEventLog
,
OldestRecord
);
if
(
!
OldestRecord
)
return
FALSE
;
if
(
!
OldestRecord
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
!
hEventLog
)
{
SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
*
OldestRecord
=
0
;
return
TRUE
;
...
...
dlls/advapi32/tests/eventlog.c
View file @
78452960
...
...
@@ -191,25 +191,20 @@ static void test_oldest(void)
SetLastError
(
0xdeadbeef
);
ret
=
GetOldestEventLogRecord
(
NULL
,
NULL
);
ok
(
!
ret
,
"Expected failure
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
oldest
=
0xdeadbeef
;
ret
=
GetOldestEventLogRecord
(
NULL
,
&
oldest
);
todo_wine
{
ok
(
!
ret
,
"Expected failure
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_HANDLE
,
"Expected ERROR_INVALID_HANDLE, got %d
\n
"
,
GetLastError
());
ok
(
oldest
==
0xdeadbeef
,
"Expected oldest to stay unchanged
\n
"
);
}
handle
=
OpenEventLogA
(
NULL
,
"Application"
);
SetLastError
(
0xdeadbeef
);
ret
=
GetOldestEventLogRecord
(
handle
,
NULL
);
ok
(
!
ret
,
"Expected failure
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
oldest
=
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