From: Charlotte Pabst cpabst@codeweavers.com
This fixes a stack overflow in Helicon Focus 8.2.0, which was introduced by b5cbb556.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57293 --- dlls/comdlg32/itemdlg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/comdlg32/itemdlg.c b/dlls/comdlg32/itemdlg.c index 784a14b47e4..b3f947c85b6 100644 --- a/dlls/comdlg32/itemdlg.c +++ b/dlls/comdlg32/itemdlg.c @@ -646,7 +646,7 @@ static HRESULT on_default_action(FileDialogImpl *This) /* Add the proper extension */ if(open_action == ONOPEN_OPEN) { - WCHAR extbuf[MAX_PATH], *newext = NULL; + WCHAR *extbuf = LocalAlloc(0, MAX_PATH * sizeof *extbuf), *newext = NULL;
if(This->current_filter) { @@ -691,6 +691,8 @@ static HRESULT on_default_action(FileDialogImpl *This) } } } + + LocalFree(extbuf); } else if (open_action == ONOPEN_SEARCH) { filter = fn_iter; }