Ticket #4401: Segmentation fault in mcviewer.
commita1f22e104decd691d4b0181ce2c01f03f595faa5
authorMichael Schuster <michael@schuster.ms>
Fri, 19 Aug 2022 11:35:20 +0000 (19 13:35 +0200)
committerAndrew Borodin <aborodin@vmail.ru>
Sat, 20 Aug 2022 16:33:12 +0000 (20 19:33 +0300)
tree61922b770e6a9baaaea6e3b94195c11235f1ce8a
parent0ef7237eea2ef97e92b793c0429be4d1ea6ffc77
Ticket #4401: Segmentation fault in mcviewer.

 * (mcview_growbuf_read_until): the previous call to mcview_show_error()
   invalidates sp by freeing view->ds_stdio_pipe. Reintroduce the check
   that was removed in a68f2d12024fd785c61848f31d49919d2afd552e but take
   sp's invalidity into account.

 * (mc_pclose): add a NULL pointer check to play safe.

Signed-off-by: Michael Schuster <michael@schuster.ms>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
lib/utilunix.c
src/viewer/growbuf.c