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
1470d7b4
Commit
1470d7b4
authored
Jan 09, 2014
by
Bruno Jesus
Committed by
Alexandre Julliard
Jan 13, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Return error for IP address with value zero in IcmpSendEcho.
parent
25e0f11c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
icmp.c
dlls/iphlpapi/icmp.c
+5
-0
iphlpapi.c
dlls/iphlpapi/tests/iphlpapi.c
+0
-2
No files found.
dlls/iphlpapi/icmp.c
View file @
1470d7b4
...
@@ -239,6 +239,11 @@ DWORD WINAPI IcmpSendEcho(
...
@@ -239,6 +239,11 @@ DWORD WINAPI IcmpSendEcho(
}
}
/* check the request size against SO_MAX_MSG_SIZE using getsockopt */
/* check the request size against SO_MAX_MSG_SIZE using getsockopt */
if
(
!
DestinationAddress
)
{
SetLastError
(
ERROR_INVALID_NETNAME
);
return
0
;
}
/* Prepare the request */
/* Prepare the request */
id
=
getpid
()
&
0xFFFF
;
id
=
getpid
()
&
0xFFFF
;
seq
=
InterlockedIncrement
(
&
icmp_sequence
)
&
0xFFFF
;
seq
=
InterlockedIncrement
(
&
icmp_sequence
)
&
0xFFFF
;
...
...
dlls/iphlpapi/tests/iphlpapi.c
View file @
1470d7b4
...
@@ -906,12 +906,10 @@ todo_wine
...
@@ -906,12 +906,10 @@ todo_wine
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
ret
=
pIcmpSendEcho
(
icmp
,
address
,
senddata
,
sizeof
(
senddata
),
NULL
,
replydata
,
replysz
,
1000
);
ret
=
pIcmpSendEcho
(
icmp
,
address
,
senddata
,
sizeof
(
senddata
),
NULL
,
replydata
,
replysz
,
1000
);
error
=
GetLastError
();
error
=
GetLastError
();
todo_wine
{
ok
(
!
ret
,
"IcmpSendEcho succeeded unexpectedly
\n
"
);
ok
(
!
ret
,
"IcmpSendEcho succeeded unexpectedly
\n
"
);
ok
(
error
==
ERROR_INVALID_NETNAME
ok
(
error
==
ERROR_INVALID_NETNAME
||
broken
(
error
==
IP_BAD_DESTINATION
)
/* <= 2003 */
,
||
broken
(
error
==
IP_BAD_DESTINATION
)
/* <= 2003 */
,
"expected 1214, got %d
\n
"
,
error
);
"expected 1214, got %d
\n
"
,
error
);
}
address
=
htonl
(
INADDR_LOOPBACK
);
address
=
htonl
(
INADDR_LOOPBACK
);
if
(
0
)
/* crashes in XP */
if
(
0
)
/* crashes in XP */
...
...
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