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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/comdlg32/itemdlg.c b/dlls/comdlg32/itemdlg.c index 784a14b47e4..b431cf9d544 100644 --- a/dlls/comdlg32/itemdlg.c +++ b/dlls/comdlg32/itemdlg.c @@ -646,7 +646,8 @@ static HRESULT on_default_action(FileDialogImpl *This) /* Add the proper extension */ if(open_action == ONOPEN_OPEN) { - WCHAR extbuf[MAX_PATH], *newext = NULL; + WCHAR *extbuf, *newext = NULL; + extbuf = malloc(sizeof(WCHAR) * MAX_PATH);
if(This->current_filter) { @@ -691,6 +692,8 @@ static HRESULT on_default_action(FileDialogImpl *This) } } } + + free(extbuf); } else if (open_action == ONOPEN_SEARCH) { filter = fn_iter; }