input/archive: check for archive_file_open() errors

This fixes a NULL pointer dereference in case of archive plugin
failure.
This commit is contained in:
Max Kellermann 2009-12-16 16:38:01 +01:00
parent 0bc8c0c1da
commit f9af1a445e

View File

@ -62,6 +62,8 @@ input_archive_open(struct input_stream *is, const char *pathname,
}
file = archive_file_open(arplug, archive);
if (file == NULL)
return false;
//setup fileops
opened = archive_file_open_stream(file, is, filename, error_r);