Ticket #4398: crash on quick view of archives.

* (extfs_cmd): make message null-terminated.
  * (sfs_vfmake): likewise.
  * (do_external_panelize): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2022-07-03 15:31:04 +03:00
parent 0b86047c81
commit ff26ce85f8
3 changed files with 5 additions and 0 deletions

View File

@ -334,6 +334,7 @@ do_external_panelize (char *command)
/* init buffers before call of mc_pread() */
external->out.len = MC_PIPE_BUFSIZE;
external->err.len = MC_PIPE_BUFSIZE;
external->err.null_term = TRUE;
mc_pread (external, &error);

View File

@ -960,6 +960,8 @@ extfs_cmd (const char *str_extfs_cmd, const struct extfs_super_t *archive,
return (-1);
}
pip->err.null_term = TRUE;
mc_pread (pip, &error);
if (error != NULL)
{

View File

@ -228,6 +228,8 @@ sfs_vfmake (const vfs_path_t * vpath, vfs_path_t * cache_vpath)
return (-1);
}
pip->err.null_term = TRUE;
mc_pread (pip, &error);
if (error != NULL)
{