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
9b626f51
Commit
9b626f51
authored
Jun 28, 2018
by
Alex Henrie
Committed by
Alexandre Julliard
Jun 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Cast caddr_t to char* before doing pointer arithmetic.
Signed-off-by:
Alex Henrie
<
alexhenrie24@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8b864ae9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
ifenum.c
dlls/iphlpapi/ifenum.c
+4
-4
No files found.
dlls/iphlpapi/ifenum.c
View file @
9b626f51
...
...
@@ -1013,13 +1013,13 @@ static DWORD enumIPAddresses(PDWORD pcAddresses, struct ifconf *ifc)
if
(
ioctlRet
==
0
)
{
ifPtr
=
ifc
->
ifc_buf
;
while
(
ifPtr
&&
ifPtr
<
ifc
->
ifc_buf
+
ifc
->
ifc_len
)
{
while
(
ifPtr
&&
(
char
*
)
ifPtr
<
ifc
->
ifc_buf
+
ifc
->
ifc_len
)
{
struct
ifreq
*
ifr
=
(
struct
ifreq
*
)
ifPtr
;
if
(
ifr
->
ifr_addr
.
sa_family
==
AF_INET
)
numAddresses
++
;
ifPtr
+=
ifreq_len
((
struct
ifreq
*
)
ifPtr
);
ifPtr
=
(
char
*
)
ifPtr
+
ifreq_len
((
struct
ifreq
*
)
ifPtr
);
}
}
else
...
...
@@ -1074,10 +1074,10 @@ DWORD getIPAddrTable(PMIB_IPADDRTABLE *ppIpAddrTable, HANDLE heap, DWORD flags)
ret
=
NO_ERROR
;
(
*
ppIpAddrTable
)
->
dwNumEntries
=
numAddresses
;
ifPtr
=
ifc
.
ifc_buf
;
while
(
!
ret
&&
ifPtr
&&
ifPtr
<
ifc
.
ifc_buf
+
ifc
.
ifc_len
)
{
while
(
!
ret
&&
ifPtr
&&
(
char
*
)
ifPtr
<
ifc
.
ifc_buf
+
ifc
.
ifc_len
)
{
struct
ifreq
*
ifr
=
(
struct
ifreq
*
)
ifPtr
;
ifPtr
+=
ifreq_len
(
ifr
);
ifPtr
=
(
char
*
)
ifPtr
+
ifreq_len
(
ifr
);
if
(
ifr
->
ifr_addr
.
sa_family
!=
AF_INET
)
continue
;
...
...
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