archive/List: disallow passing suffix==nullptr to archive_plugin_from_suffix()

This commit is contained in:
Max Kellermann
2019-05-31 19:05:26 +02:00
parent 12e75a523a
commit 0e8ca44968
2 changed files with 4 additions and 2 deletions

View File

@@ -58,6 +58,8 @@ OpenArchiveInputStream(Path path, Mutex &mutex)
}
const char *suffix = Path::FromFS(archive).GetSuffix();
if (suffix == nullptr)
return nullptr;
//check which archive plugin to use (by ext)
arplug = archive_plugin_from_suffix(suffix);