Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7ffaafb2
Commit
7ffaafb2
authored
Oct 03, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Oct 06, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Fix behaviour of InternetTimeFromSystemTimeA/W when dealing with invalid parameters.
parent
2584323f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
internet.c
dlls/wininet/internet.c
+9
-0
internet.c
dlls/wininet/tests/internet.c
+0
-6
No files found.
dlls/wininet/internet.c
View file @
7ffaafb2
...
...
@@ -2478,6 +2478,12 @@ BOOL WINAPI InternetTimeFromSystemTimeA( const SYSTEMTIME* time, DWORD format, L
TRACE
(
"%p 0x%08x %p 0x%08x
\n
"
,
time
,
format
,
string
,
size
);
if
(
!
time
||
!
string
||
format
!=
INTERNET_RFC1123_FORMAT
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
size
<
INTERNET_RFC1123_BUFSIZE
*
sizeof
(
*
string
))
{
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
...
...
@@ -2502,7 +2508,10 @@ BOOL WINAPI InternetTimeFromSystemTimeW( const SYSTEMTIME* time, DWORD format, L
TRACE
(
"%p 0x%08x %p 0x%08x
\n
"
,
time
,
format
,
string
,
size
);
if
(
!
time
||
!
string
||
format
!=
INTERNET_RFC1123_FORMAT
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
size
<
INTERNET_RFC1123_BUFSIZE
*
sizeof
(
*
string
))
{
...
...
dlls/wininet/tests/internet.c
View file @
7ffaafb2
...
...
@@ -386,7 +386,6 @@ static void InternetTimeFromSystemTimeA_test(void)
ret
=
pInternetTimeFromSystemTimeA
(
NULL
,
INTERNET_RFC1123_FORMAT
,
string
,
sizeof
(
string
)
);
error
=
GetLastError
();
ok
(
!
ret
,
"InternetTimeFromSystemTimeA should have returned FALSE
\n
"
);
todo_wine
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"InternetTimeFromSystemTimeA failed with ERROR_INVALID_PARAMETER instead of %u
\n
"
,
error
);
...
...
@@ -395,7 +394,6 @@ static void InternetTimeFromSystemTimeA_test(void)
SetLastError
(
0xdeadbeef
);
ret
=
pInternetTimeFromSystemTimeA
(
&
time
,
INTERNET_RFC1123_FORMAT
,
NULL
,
sizeof
(
string
)
);
error
=
GetLastError
();
todo_wine
ok
(
!
ret
,
"InternetTimeFromSystemTimeA should have returned FALSE
\n
"
);
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"InternetTimeFromSystemTimeA failed with ERROR_INVALID_PARAMETER instead of %u
\n
"
,
...
...
@@ -406,7 +404,6 @@ static void InternetTimeFromSystemTimeA_test(void)
ret
=
pInternetTimeFromSystemTimeA
(
&
time
,
INTERNET_RFC1123_FORMAT
+
1
,
string
,
sizeof
(
string
)
);
error
=
GetLastError
();
ok
(
!
ret
,
"InternetTimeFromSystemTimeA should have returned FALSE
\n
"
);
todo_wine
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"InternetTimeFromSystemTimeA failed with ERROR_INVALID_PARAMETER instead of %u
\n
"
,
error
);
...
...
@@ -441,7 +438,6 @@ static void InternetTimeFromSystemTimeW_test(void)
ret
=
pInternetTimeFromSystemTimeW
(
NULL
,
INTERNET_RFC1123_FORMAT
,
string
,
sizeof
(
string
)
);
error
=
GetLastError
();
ok
(
!
ret
,
"InternetTimeFromSystemTimeW should have returned FALSE
\n
"
);
todo_wine
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"InternetTimeFromSystemTimeW failed with ERROR_INVALID_PARAMETER instead of %u
\n
"
,
error
);
...
...
@@ -451,7 +447,6 @@ static void InternetTimeFromSystemTimeW_test(void)
ret
=
pInternetTimeFromSystemTimeW
(
&
time
,
INTERNET_RFC1123_FORMAT
,
NULL
,
sizeof
(
string
)
);
error
=
GetLastError
();
ok
(
!
ret
,
"InternetTimeFromSystemTimeW should have returned FALSE
\n
"
);
todo_wine
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"InternetTimeFromSystemTimeW failed with ERROR_INVALID_PARAMETER instead of %u
\n
"
,
error
);
...
...
@@ -461,7 +456,6 @@ static void InternetTimeFromSystemTimeW_test(void)
ret
=
pInternetTimeFromSystemTimeW
(
&
time
,
INTERNET_RFC1123_FORMAT
+
1
,
string
,
sizeof
(
string
)
);
error
=
GetLastError
();
ok
(
!
ret
,
"InternetTimeFromSystemTimeW should have returned FALSE
\n
"
);
todo_wine
ok
(
error
==
ERROR_INVALID_PARAMETER
,
"InternetTimeFromSystemTimeW failed with ERROR_INVALID_PARAMETER instead of %u
\n
"
,
error
);
...
...
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