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
fe5471e7
Commit
fe5471e7
authored
Mar 12, 2007
by
Kanit Therdsteerasukdi
Committed by
Alexandre Julliard
Mar 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: datetime: Reject out of range dates in DTM_SETSYSTEMTIME.
parent
d9445ce7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
4 deletions
+13
-4
datetime.c
dlls/comctl32/datetime.c
+11
-0
datetime.c
dlls/comctl32/tests/datetime.c
+2
-4
No files found.
dlls/comctl32/datetime.c
View file @
fe5471e7
...
...
@@ -160,6 +160,17 @@ DATETIME_SetSystemTime (DATETIME_INFO *infoPtr, DWORD flag, SYSTEMTIME *lprgSysT
lprgSysTimeArray
->
wYear
,
lprgSysTimeArray
->
wMonth
,
lprgSysTimeArray
->
wDay
,
lprgSysTimeArray
->
wHour
,
lprgSysTimeArray
->
wMinute
,
lprgSysTimeArray
->
wSecond
);
if
(
lprgSysTimeArray
->
wYear
<
1601
||
lprgSysTimeArray
->
wYear
>
30827
||
lprgSysTimeArray
->
wMonth
<
1
||
lprgSysTimeArray
->
wMonth
>
12
||
lprgSysTimeArray
->
wDayOfWeek
>
6
||
lprgSysTimeArray
->
wDay
<
1
||
lprgSysTimeArray
->
wDay
>
31
||
lprgSysTimeArray
->
wHour
>
23
||
lprgSysTimeArray
->
wMinute
>
59
||
lprgSysTimeArray
->
wSecond
>
59
||
lprgSysTimeArray
->
wMilliseconds
>
999
)
return
0
;
if
(
flag
==
GDT_VALID
)
{
infoPtr
->
dateValid
=
TRUE
;
MONTHCAL_CopyTime
(
lprgSysTimeArray
,
&
infoPtr
->
date
);
...
...
dlls/comctl32/tests/datetime.c
View file @
fe5471e7
...
...
@@ -509,10 +509,8 @@ static void test_dtm_set_and_get_system_time(HWND hWndDateTime)
/* set st to invalid value */
fill_systime_struct
(
&
st
,
0
,
0
,
7
,
0
,
24
,
60
,
60
,
1000
);
todo_wine
{
r
=
SendMessage
(
hWndDateTime
,
DTM_SETSYSTEMTIME
,
GDT_VALID
,
(
LPARAM
)
&
st
);
expect_unsuccess
(
0
,
r
);
}
r
=
SendMessage
(
hWndDateTime
,
DTM_SETSYSTEMTIME
,
GDT_VALID
,
(
LPARAM
)
&
st
);
expect_unsuccess
(
0
,
r
);
ok_sequence
(
sequences
,
DATETIME_SEQ_INDEX
,
test_dtm_set_and_get_system_time_seq
,
"test_dtm_set_and_get_system_time"
,
FALSE
);
flush_sequences
(
sequences
,
NUM_MSG_SEQUENCES
);
...
...
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