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
5530977f
Commit
5530977f
authored
Jul 22, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetmib1: Check for failure of the iphlpapi functions instead of blindly trusting them.
parent
70a9d70b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
15 deletions
+30
-15
main.c
dlls/inetmib1/main.c
+30
-15
No files found.
dlls/inetmib1/main.c
View file @
5530977f
...
...
@@ -107,9 +107,12 @@ static void mib2IfNumberInit(void)
if
(
ret
==
ERROR_INSUFFICIENT_BUFFER
)
{
ifTable
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
ifTable
)
GetIfTable
(
ifTable
,
&
size
,
FALSE
);
MIB_IFTABLE
*
table
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
table
)
{
if
(
!
GetIfTable
(
table
,
&
size
,
FALSE
))
ifTable
=
table
;
else
HeapFree
(
GetProcessHeap
(),
0
,
table
);
}
}
}
...
...
@@ -633,9 +636,12 @@ static void mib2IpAddrInit(void)
if
(
ret
==
ERROR_INSUFFICIENT_BUFFER
)
{
ipAddrTable
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
ipAddrTable
)
GetIpAddrTable
(
ipAddrTable
,
&
size
,
TRUE
);
MIB_IPADDRTABLE
*
table
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
table
)
{
if
(
!
GetIpAddrTable
(
table
,
&
size
,
TRUE
))
ipAddrTable
=
table
;
else
HeapFree
(
GetProcessHeap
(),
0
,
table
);
}
}
}
...
...
@@ -721,9 +727,12 @@ static void mib2IpRouteInit(void)
if
(
ret
==
ERROR_INSUFFICIENT_BUFFER
)
{
ipRouteTable
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
ipRouteTable
)
GetIpForwardTable
(
ipRouteTable
,
&
size
,
TRUE
);
MIB_IPFORWARDTABLE
*
table
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
table
)
{
if
(
!
GetIpForwardTable
(
ipRouteTable
,
&
size
,
TRUE
))
ipRouteTable
=
table
;
else
HeapFree
(
GetProcessHeap
(),
0
,
table
);
}
}
}
...
...
@@ -801,9 +810,12 @@ static void mib2IpNetInit(void)
if
(
ret
==
ERROR_INSUFFICIENT_BUFFER
)
{
ipNetTable
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
ipNetTable
)
GetIpNetTable
(
ipNetTable
,
&
size
,
FALSE
);
MIB_IPNETTABLE
*
table
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
table
)
{
if
(
!
GetIpNetTable
(
ipNetTable
,
&
size
,
FALSE
))
ipNetTable
=
table
;
else
HeapFree
(
GetProcessHeap
(),
0
,
table
);
}
}
}
...
...
@@ -1047,9 +1059,12 @@ static void mib2UdpEntryInit(void)
if
(
ret
==
ERROR_INSUFFICIENT_BUFFER
)
{
udpTable
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
udpTable
)
GetUdpTable
(
udpTable
,
&
size
,
TRUE
);
MIB_UDPTABLE
*
table
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
table
)
{
if
(
!
GetUdpTable
(
table
,
&
size
,
TRUE
))
udpTable
=
table
;
else
HeapFree
(
GetProcessHeap
(),
0
,
table
);
}
}
}
...
...
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