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
42b2a69a
Commit
42b2a69a
authored
Feb 02, 2022
by
Paul Gofman
Committed by
Alexandre Julliard
Feb 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hnetcfg: Fix realloc handling in fw_app_put_ProcessImageFileName().
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
95aa1bab
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
apps.c
dlls/hnetcfg/apps.c
+3
-2
No files found.
dlls/hnetcfg/apps.c
View file @
42b2a69a
...
@@ -269,7 +269,7 @@ static HRESULT WINAPI fw_app_put_ProcessImageFileName(
...
@@ -269,7 +269,7 @@ static HRESULT WINAPI fw_app_put_ProcessImageFileName(
fw_app
*
This
=
impl_from_INetFwAuthorizedApplication
(
iface
);
fw_app
*
This
=
impl_from_INetFwAuthorizedApplication
(
iface
);
UNIVERSAL_NAME_INFOW
*
info
;
UNIVERSAL_NAME_INFOW
*
info
;
DWORD
sz
,
longsz
;
DWORD
sz
,
longsz
;
WCHAR
*
path
;
WCHAR
*
path
,
*
new_path
;
DWORD
res
;
DWORD
res
;
FIXME
(
"%p, %s
\n
"
,
This
,
debugstr_w
(
image
));
FIXME
(
"%p, %s
\n
"
,
This
,
debugstr_w
(
image
));
...
@@ -303,11 +303,12 @@ static HRESULT WINAPI fw_app_put_ProcessImageFileName(
...
@@ -303,11 +303,12 @@ static HRESULT WINAPI fw_app_put_ProcessImageFileName(
longsz
=
GetLongPathNameW
(
path
,
path
,
sz
);
longsz
=
GetLongPathNameW
(
path
,
path
,
sz
);
if
(
longsz
>
sz
)
if
(
longsz
>
sz
)
{
{
if
(
!
(
path
=
realloc
(
path
,
longsz
*
sizeof
(
WCHAR
))))
if
(
!
(
new_
path
=
realloc
(
path
,
longsz
*
sizeof
(
WCHAR
))))
{
{
free
(
path
);
free
(
path
);
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
}
}
path
=
new_path
;
GetLongPathNameW
(
path
,
path
,
longsz
);
GetLongPathNameW
(
path
,
path
,
longsz
);
}
}
...
...
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