Ticket #3016: Segfault while entering into extfs archive
Current master (4.8.8-49-g6b64835) segfaults while entering into any extfs archive (zip, rar, etc). Bad commit is 2640b21bb9700aa51a70f35f9e10732c82a7366f. Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Этот коммит содержится в:
родитель
fef50bf629
Коммит
56520fda0f
@ -666,6 +666,7 @@ extfs_which (struct vfs_class *me, const char *path)
|
||||
static const char *
|
||||
extfs_get_path_int (const vfs_path_t * vpath, struct archive **archive, gboolean do_not_open)
|
||||
{
|
||||
char *archive_name;
|
||||
int result = -1;
|
||||
struct archive *parc;
|
||||
int fstype;
|
||||
@ -677,6 +678,8 @@ extfs_get_path_int (const vfs_path_t * vpath, struct archive **archive, gboolean
|
||||
if (fstype == -1)
|
||||
return NULL;
|
||||
|
||||
archive_name = vfs_path_to_str_elements_count (vpath, -1);
|
||||
|
||||
/*
|
||||
* All filesystems should have some local archive, at least
|
||||
* it can be PATH_SEP ('/').
|
||||
@ -684,14 +687,15 @@ extfs_get_path_int (const vfs_path_t * vpath, struct archive **archive, gboolean
|
||||
for (parc = first_archive; parc != NULL; parc = parc->next)
|
||||
if (parc->name != NULL)
|
||||
{
|
||||
if (strcmp (parc->name, vfs_path_as_str (vpath)) == 0)
|
||||
if (strcmp (parc->name, archive_name) == 0)
|
||||
{
|
||||
vfs_stamp (&vfs_extfs_ops, (vfsid) parc);
|
||||
goto return_success;
|
||||
}
|
||||
}
|
||||
|
||||
result = do_not_open ? -1 : extfs_read_archive (fstype, vfs_path_as_str (vpath), &parc);
|
||||
result = do_not_open ? -1 : extfs_read_archive (fstype, archive_name, &parc);
|
||||
g_free (archive_name);
|
||||
if (result == -1)
|
||||
{
|
||||
path_element->class->verrno = EIO;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user