Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b970b220
Commit
b970b220
authored
Jan 30, 2006
by
Marcus Meissner
Committed by
Alexandre Julliard
Jan 30, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Allocate space enough to handle all the possible ipv4 addresses.
parent
7b6f8547
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
iphlpapi_main.c
dlls/iphlpapi/iphlpapi_main.c
+2
-6
No files found.
dlls/iphlpapi/iphlpapi_main.c
View file @
b970b220
...
@@ -654,9 +654,7 @@ DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO pAdapterInfo, PULONG pOutBufLen)
...
@@ -654,9 +654,7 @@ DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO pAdapterInfo, PULONG pOutBufLen)
* precisely enough space.
* precisely enough space.
*/
*/
size
=
sizeof
(
IP_ADAPTER_INFO
)
*
numNonLoopbackInterfaces
;
size
=
sizeof
(
IP_ADAPTER_INFO
)
*
numNonLoopbackInterfaces
;
if
(
numIPAddresses
>
numNonLoopbackInterfaces
)
size
+=
numIPAddresses
*
sizeof
(
IP_ADDR_STRING
);
size
+=
(
numIPAddresses
-
numNonLoopbackInterfaces
)
*
sizeof
(
IP_ADDR_STRING
);
if
(
!
pAdapterInfo
||
*
pOutBufLen
<
size
)
{
if
(
!
pAdapterInfo
||
*
pOutBufLen
<
size
)
{
*
pOutBufLen
=
size
;
*
pOutBufLen
=
size
;
ret
=
ERROR_BUFFER_OVERFLOW
;
ret
=
ERROR_BUFFER_OVERFLOW
;
...
@@ -670,9 +668,7 @@ DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO pAdapterInfo, PULONG pOutBufLen)
...
@@ -670,9 +668,7 @@ DWORD WINAPI GetAdaptersInfo(PIP_ADAPTER_INFO pAdapterInfo, PULONG pOutBufLen)
table
=
getNonLoopbackInterfaceIndexTable
();
table
=
getNonLoopbackInterfaceIndexTable
();
if
(
table
)
{
if
(
table
)
{
size
=
sizeof
(
IP_ADAPTER_INFO
)
*
table
->
numIndexes
;
size
=
sizeof
(
IP_ADAPTER_INFO
)
*
table
->
numIndexes
;
if
(
ipAddrTable
->
dwNumEntries
>
numNonLoopbackInterfaces
)
size
+=
ipAddrTable
->
dwNumEntries
*
sizeof
(
IP_ADDR_STRING
);
size
+=
(
ipAddrTable
->
dwNumEntries
-
numNonLoopbackInterfaces
)
*
sizeof
(
IP_ADDR_STRING
);
if
(
*
pOutBufLen
<
size
)
{
if
(
*
pOutBufLen
<
size
)
{
*
pOutBufLen
=
size
;
*
pOutBufLen
=
size
;
ret
=
ERROR_INSUFFICIENT_BUFFER
;
ret
=
ERROR_INSUFFICIENT_BUFFER
;
...
...
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