Skip to content

Commit

Permalink
Merge branch '4398-quicview_segfault'
Browse files Browse the repository at this point in the history
* 4398-quicview_segfault:
  Ticket #4398: crash on quick view of archives.
  • Loading branch information
aborodin committed Aug 14, 2022
2 parents 0b86047 + ff26ce8 commit 1a2682d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/filemanager/panelize.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 2 additions & 0 deletions src/vfs/extfs/extfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
2 changes: 2 additions & 0 deletions src/vfs/sfs/sfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 1a2682d

Please sign in to comment.