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
7ef04f41
Commit
7ef04f41
authored
May 16, 2022
by
Paul Gofman
Committed by
Alexandre Julliard
May 17, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nsi: Allocate a small buffer at once in NsiAllocateAndGetTable().
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
50c27f88
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
nsi.c
dlls/nsi/nsi.c
+4
-5
No files found.
dlls/nsi/nsi.c
View file @
7ef04f41
...
...
@@ -39,7 +39,7 @@ DWORD WINAPI NsiAllocateAndGetTable( DWORD unk, const NPI_MODULEID *module, DWOR
void
**
rw_data
,
DWORD
rw_size
,
void
**
dynamic_data
,
DWORD
dynamic_size
,
void
**
static_data
,
DWORD
static_size
,
DWORD
*
count
,
DWORD
unk2
)
{
DWORD
err
,
num
=
0
;
DWORD
err
,
num
=
64
;
void
*
data
[
4
]
=
{
NULL
};
DWORD
sizes
[
4
]
=
{
key_size
,
rw_size
,
dynamic_size
,
static_size
};
int
i
,
attempt
;
...
...
@@ -49,9 +49,6 @@ DWORD WINAPI NsiAllocateAndGetTable( DWORD unk, const NPI_MODULEID *module, DWOR
for
(
attempt
=
0
;
attempt
<
5
;
attempt
++
)
{
err
=
NsiEnumerateObjectsAllParameters
(
unk
,
0
,
module
,
table
,
NULL
,
0
,
NULL
,
0
,
NULL
,
0
,
NULL
,
0
,
&
num
);
if
(
err
)
return
err
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
data
);
i
++
)
{
if
(
sizes
[
i
])
...
...
@@ -68,9 +65,11 @@ DWORD WINAPI NsiAllocateAndGetTable( DWORD unk, const NPI_MODULEID *module, DWOR
err
=
NsiEnumerateObjectsAllParameters
(
unk
,
0
,
module
,
table
,
data
[
0
],
sizes
[
0
],
data
[
1
],
sizes
[
1
],
data
[
2
],
sizes
[
2
],
data
[
3
],
sizes
[
3
],
&
num
);
if
(
err
!=
ERROR_MORE_DATA
)
break
;
TRACE
(
"Short buffer, attempt %d.
\n
"
,
attempt
);
NsiFreeTable
(
data
[
0
],
data
[
1
],
data
[
2
],
data
[
3
]
);
memset
(
data
,
0
,
sizeof
(
data
)
);
err
=
NsiEnumerateObjectsAllParameters
(
unk
,
0
,
module
,
table
,
NULL
,
0
,
NULL
,
0
,
NULL
,
0
,
NULL
,
0
,
&
num
);
if
(
err
)
return
err
;
}
if
(
!
err
)
...
...
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