Merge branch '4422_extfs_segfault'

* 4422_extfs_segfault:
  Update doc/NEWS file.
  (extfs_read_archive): show error message.
  Ticket #4422: extfs: segfault if archive contains file(s) in the parent directory.
This commit is contained in:
Andrew Borodin 2023-01-11 18:48:11 +03:00
commit ce16fa5746
2 changed files with 4 additions and 1 deletions

View File

@ -53,6 +53,7 @@ Version 4.8.29
* FISH subshell: commands don't work after window resize (#4372)
* FTP VFS: doesn't reconnect to server after timeout (#3670)
* FISH VFS: cannot remove non-empty directory (#4364)
* EXTFS VFS:: segfault if archive contains file(s) in the parent directory (#4422)
* Tests: variable redeclaration in filevercmp_test5 (#4358)

View File

@ -254,7 +254,7 @@ extfs_find_entry_int (struct vfs_s_inode *dir, const char *name, GSList * list,
*q = '\0';
if (DIR_IS_DOTDOT (p))
pent = pent->dir->ent;
pent = pent->dir != NULL ? pent->dir->ent : NULL;
else
{
GList *pl;
@ -687,6 +687,8 @@ extfs_read_archive (mc_pipe_t * pip, struct extfs_super_t *archive, GError ** er
g_string_free (err_msg, TRUE);
}
else if (*error == NULL)
mc_propagate_error (error, 0, "%s", _("Inconsistent archive"));
return ret;
}