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
f70c9ae8
Commit
f70c9ae8
authored
May 16, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
May 17, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Fixed handing NULL buffer in InternetReadFileExW.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cebb5d30
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
internet.c
dlls/wininet/internet.c
+1
-1
http.c
dlls/wininet/tests/http.c
+5
-0
No files found.
dlls/wininet/internet.c
View file @
f70c9ae8
...
...
@@ -2280,7 +2280,7 @@ BOOL WINAPI InternetReadFileExW(HINTERNET hFile, LPINTERNET_BUFFERSW lpBuffer,
TRACE
(
"(%p %p 0x%x 0x%lx)
\n
"
,
hFile
,
lpBuffer
,
dwFlags
,
dwContext
);
if
(
lpBuffer
->
dwStructSize
!=
sizeof
(
*
lpBuffer
))
{
if
(
!
lpBuffer
||
lpBuffer
->
dwStructSize
!=
sizeof
(
*
lpBuffer
))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
...
...
dlls/wininet/tests/http.c
View file @
f70c9ae8
...
...
@@ -1067,6 +1067,11 @@ static void InternetReadFileExA_test(int flags)
CLEAR_NOTIFIED
(
INTERNET_STATUS_CONNECTING_TO_SERVER
);
CLEAR_NOTIFIED
(
INTERNET_STATUS_CONNECTED_TO_SERVER
);
rc
=
InternetReadFileExW
(
hor
,
NULL
,
0
,
0xdeadcafe
);
ok
(
!
rc
&&
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
),
"InternetReadFileEx should have failed with ERROR_INVALID_PARAMETER instead of %s, %u
\n
"
,
rc
?
"TRUE"
:
"FALSE"
,
GetLastError
());
/* tests invalid dwStructSize */
inetbuffers
.
dwStructSize
=
sizeof
(
inetbuffers
)
+
1
;
inetbuffers
.
lpcszHeader
=
NULL
;
...
...
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