mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Ticket #4269: (edit_close_cmd): fix use-after-free.
The old 'w' pointer became invalid after widget_destroy() call, so we need to get the new widget directly after find_editor. Found using PVS-Studio 7.14 with intermodular analysis mode. Signed-off-by: Sergey Larin <cerg2010cerg2010@mail.ru> Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
eab84392ef
commit
2234fd8357
2
doc/NEWS
2
doc/NEWS
@ -32,7 +32,7 @@ Version 4.8.27
|
||||
|
||||
- Misc
|
||||
|
||||
* Code clean up (#4179, #4173)
|
||||
* Code clean up (#4179, #4173, #4269)
|
||||
* Filehighlight of c++ and h++ files as sources (#4194)
|
||||
* Filehighlight of JSON files as documents (#4250)
|
||||
* Support of alacritty terminal emulator (https://github.com/alacritty/alacritty) (#4248)
|
||||
|
@ -1244,7 +1244,7 @@ edit_close_cmd (WEdit * edit)
|
||||
{
|
||||
edit = find_editor (DIALOG (g));
|
||||
if (edit != NULL)
|
||||
widget_select (w);
|
||||
widget_select (WIDGET (edit));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user