mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
Merge branch '2535_ftp_segfault'
* 2535_ftp_segfault: Check whether VFS provides an open_archive() method. Ticket #2535: segfault in FTP VFS
This commit is contained in:
commit
2758599bc2
@ -1067,6 +1067,7 @@ vfs_s_get_path_mangle (struct vfs_class *me, char *inname, struct vfs_s_super **
|
||||
ERRNOR (EIO, NULL);
|
||||
|
||||
super = vfs_s_new_super (me);
|
||||
if (MEDATA->open_archive != NULL)
|
||||
result = MEDATA->open_archive (me, super, archive_name, op);
|
||||
if (result == -1)
|
||||
{
|
||||
@ -1198,6 +1199,7 @@ vfs_s_open (struct vfs_class *me, const char *file, int flags, mode_t mode)
|
||||
fh->handle = -1;
|
||||
fh->changed = was_changed;
|
||||
fh->linear = 0;
|
||||
fh->data = NULL;
|
||||
|
||||
if (IS_LINEAR (flags))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user