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
01e21366
Commit
01e21366
authored
Jun 29, 2008
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 30, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Avoid a crash on an invalid handle in InternetQueryOption.
parent
f1dc1bb0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
internet.c
dlls/wininet/internet.c
+1
-1
internet.c
dlls/wininet/tests/internet.c
+6
-0
No files found.
dlls/wininet/internet.c
View file @
01e21366
...
...
@@ -1904,7 +1904,7 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
TRACE
(
"INTERNET_OPTION_USER_AGENT
\n
"
);
if
(
lpwhh
->
htype
!=
INTERNET_HANDLE_TYPE_INTERNET
)
if
(
!
lpwhh
||
lpwhh
->
htype
!=
INTERNET_HANDLE_TYPE_INTERNET
)
{
INTERNET_SetLastError
(
ERROR_INTERNET_INCORRECT_HANDLE_TYPE
);
return
FALSE
;
...
...
dlls/wininet/tests/internet.c
View file @
01e21366
...
...
@@ -150,6 +150,12 @@ static void test_InternetQueryOptionA(void)
ok
((
hinet
!=
0x0
),
"InternetOpen Failed
\n
"
);
SetLastError
(
0xdeadbeef
);
retval
=
InternetQueryOptionA
(
NULL
,
INTERNET_OPTION_USER_AGENT
,
NULL
,
&
len
);
err
=
GetLastError
();
ok
(
retval
==
0
,
"Got wrong return value %d
\n
"
,
retval
);
ok
(
err
==
ERROR_INTERNET_INCORRECT_HANDLE_TYPE
,
"Got wrong error code%d
\n
"
,
err
);
SetLastError
(
0xdeadbeef
);
len
=
strlen
(
useragent
)
+
1
;
retval
=
InternetQueryOptionA
(
hinet
,
INTERNET_OPTION_USER_AGENT
,
NULL
,
&
len
);
err
=
GetLastError
();
...
...
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