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
a239e8ed
Commit
a239e8ed
authored
Jun 21, 2012
by
Per Johansson
Committed by
Alexandre Julliard
Jun 22, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: In WSAIoctl(SIO_GET_INTERFACE_LIST), skip interfaces with no IPv4 address.
parent
485d3531
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
12 deletions
+14
-12
socket.c
dlls/ws2_32/socket.c
+14
-12
No files found.
dlls/ws2_32/socket.c
View file @
a239e8ed
...
...
@@ -3195,27 +3195,27 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
{
PIP_ADAPTER_INFO
ptr
;
if
(
size
*
sizeof
(
INTERFACE_INFO
)
/
sizeof
(
IP_ADAPTER_INFO
)
>
out_size
)
{
WARN
(
"Buffer too small = %u, out_size = %u
\n
"
,
size
,
out_size
);
HeapFree
(
GetProcessHeap
(),
0
,
table
);
release_sock_fd
(
s
,
fd
);
status
=
WSAEFAULT
;
break
;
}
for
(
ptr
=
table
,
numInt
=
0
;
ptr
;
ptr
=
ptr
->
Next
,
intArray
++
,
numInt
++
)
for
(
ptr
=
table
,
numInt
=
0
;
ptr
;
ptr
=
ptr
->
Next
)
{
unsigned
int
addr
,
mask
,
bcast
;
struct
ifreq
ifInfo
;
/* Skip interfaces without an IPv4 address. */
if
(
ptr
->
IpAddressList
.
IpAddress
.
String
[
0
]
==
'\0'
)
continue
;
if
((
numInt
+
1
)
*
sizeof
(
INTERFACE_INFO
)
/
sizeof
(
IP_ADAPTER_INFO
)
>
out_size
)
{
WARN
(
"Buffer too small = %u, out_size = %u
\n
"
,
numInt
+
1
,
out_size
);
status
=
WSAEFAULT
;
break
;
}
/* Socket Status Flags */
lstrcpynA
(
ifInfo
.
ifr_name
,
ptr
->
AdapterName
,
IFNAMSIZ
);
if
(
ioctl
(
fd
,
SIOCGIFFLAGS
,
&
ifInfo
)
<
0
)
{
ERR
(
"Error obtaining status flags for socket!
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
table
);
release_sock_fd
(
s
,
fd
);
status
=
WSAEINVAL
;
break
;
}
...
...
@@ -3255,6 +3255,8 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
intArray
->
iiBroadcastAddress
.
AddressIn
.
sin_port
=
0
;
intArray
->
iiBroadcastAddress
.
AddressIn
.
sin_addr
.
WS_s_addr
=
bcast
;
intArray
++
;
numInt
++
;
}
}
else
...
...
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