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
a5d14fa9
Commit
a5d14fa9
authored
Mar 15, 2022
by
Daniel Lehman
Committed by
Alexandre Julliard
Mar 16, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Check for invalid value in FileTimeToSystemTime.
Signed-off-by:
Daniel Lehman
<
dlehman@esri.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a4a7ab8e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
time.c
dlls/kernel32/tests/time.c
+0
-2
file.c
dlls/kernelbase/file.c
+7
-1
No files found.
dlls/kernel32/tests/time.c
View file @
a5d14fa9
...
...
@@ -400,11 +400,9 @@ static void test_FileTimeToSystemTime(void)
ft
.
dwLowDateTime
=
-
1
;
SetLastError
(
0xdeadbeef
);
ret
=
FileTimeToSystemTime
(
&
ft
,
&
st
);
todo_wine
{
ok
(
!
ret
,
"expected failure
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER, got %ld
\n
"
,
GetLastError
());
}
}
static
void
test_FileTimeToLocalFileTime
(
void
)
...
...
dlls/kernelbase/file.c
View file @
a5d14fa9
...
...
@@ -3874,8 +3874,14 @@ BOOL WINAPI DECLSPEC_HOTPATCH FileTimeToLocalFileTime( const FILETIME *utc, FILE
BOOL
WINAPI
DECLSPEC_HOTPATCH
FileTimeToSystemTime
(
const
FILETIME
*
ft
,
SYSTEMTIME
*
systime
)
{
TIME_FIELDS
tf
;
const
LARGE_INTEGER
*
li
=
(
const
LARGE_INTEGER
*
)
ft
;
RtlTimeToTimeFields
(
(
const
LARGE_INTEGER
*
)
ft
,
&
tf
);
if
(
li
->
QuadPart
<
0
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
RtlTimeToTimeFields
(
li
,
&
tf
);
systime
->
wYear
=
tf
.
Year
;
systime
->
wMonth
=
tf
.
Month
;
systime
->
wDay
=
tf
.
Day
;
...
...
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