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
f74e1b1f
Commit
f74e1b1f
authored
Apr 23, 2017
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 24, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Fix string leak.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e015928a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
autocomplete.c
dlls/shell32/autocomplete.c
+7
-2
No files found.
dlls/shell32/autocomplete.c
View file @
f74e1b1f
...
@@ -99,7 +99,6 @@ static inline IAutoCompleteImpl *impl_from_IAutoCompleteDropDown(IAutoCompleteDr
...
@@ -99,7 +99,6 @@ static inline IAutoCompleteImpl *impl_from_IAutoCompleteDropDown(IAutoCompleteDr
static
LRESULT
APIENTRY
ACEditSubclassProc
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
static
LRESULT
APIENTRY
ACEditSubclassProc
(
HWND
hwnd
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
{
IAutoCompleteImpl
*
This
=
GetPropW
(
hwnd
,
autocomplete_propertyW
);
IAutoCompleteImpl
*
This
=
GetPropW
(
hwnd
,
autocomplete_propertyW
);
LPOLESTR
strs
;
HRESULT
hr
;
HRESULT
hr
;
WCHAR
hwndText
[
255
];
WCHAR
hwndText
[
255
];
WCHAR
*
hwndQCText
;
WCHAR
*
hwndQCText
;
...
@@ -222,7 +221,9 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
...
@@ -222,7 +221,9 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
IEnumString_Reset
(
This
->
enumstr
);
IEnumString_Reset
(
This
->
enumstr
);
filled
=
FALSE
;
filled
=
FALSE
;
for
(
cpt
=
0
;;)
{
for
(
cpt
=
0
;;)
{
LPOLESTR
strs
=
NULL
;
ULONG
fetched
;
ULONG
fetched
;
hr
=
IEnumString_Next
(
This
->
enumstr
,
1
,
&
strs
,
&
fetched
);
hr
=
IEnumString_Next
(
This
->
enumstr
,
1
,
&
strs
,
&
fetched
);
if
(
hr
!=
S_OK
)
if
(
hr
!=
S_OK
)
break
;
break
;
...
@@ -235,9 +236,11 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
...
@@ -235,9 +236,11 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
strcatW
(
buffW
,
&
strs
[
len
]);
strcatW
(
buffW
,
&
strs
[
len
]);
SetWindowTextW
(
hwnd
,
buffW
);
SetWindowTextW
(
hwnd
,
buffW
);
SendMessageW
(
hwnd
,
EM_SETSEL
,
len
,
strlenW
(
strs
));
SendMessageW
(
hwnd
,
EM_SETSEL
,
len
,
strlenW
(
strs
));
if
(
!
(
This
->
options
&
ACO_AUTOSUGGEST
))
if
(
!
(
This
->
options
&
ACO_AUTOSUGGEST
))
{
CoTaskMemFree
(
strs
);
break
;
break
;
}
}
}
if
(
This
->
options
&
ACO_AUTOSUGGEST
)
{
if
(
This
->
options
&
ACO_AUTOSUGGEST
)
{
SendMessageW
(
This
->
hwndListBox
,
LB_ADDSTRING
,
0
,
(
LPARAM
)
strs
);
SendMessageW
(
This
->
hwndListBox
,
LB_ADDSTRING
,
0
,
(
LPARAM
)
strs
);
...
@@ -246,6 +249,8 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
...
@@ -246,6 +249,8 @@ static LRESULT APIENTRY ACEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam,
filled
=
TRUE
;
filled
=
TRUE
;
}
}
CoTaskMemFree
(
strs
);
}
}
if
(
This
->
options
&
ACO_AUTOSUGGEST
)
{
if
(
This
->
options
&
ACO_AUTOSUGGEST
)
{
...
...
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