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:
Andrew Borodin 2011-04-12 15:57:50 +04:00
commit 2758599bc2

View File

@ -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))
{