Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
0e8ca449
Commit
0e8ca449
authored
6 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
archive/List: disallow passing suffix==nullptr to archive_plugin_from_suffix()
parent
12e75a52
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
ArchiveList.cxx
src/archive/ArchiveList.cxx
+2
-2
ArchiveInputPlugin.cxx
src/input/plugins/ArchiveInputPlugin.cxx
+2
-0
No files found.
src/archive/ArchiveList.cxx
View file @
0e8ca449
...
...
@@ -26,6 +26,7 @@
#include "plugins/ZzipArchivePlugin.hxx"
#include "util/Macros.hxx"
#include <assert.h>
#include <string.h>
const
ArchivePlugin
*
const
archive_plugins
[]
=
{
...
...
@@ -51,8 +52,7 @@ static bool archive_plugins_enabled[ARRAY_SIZE(archive_plugins) - 1];
const
ArchivePlugin
*
archive_plugin_from_suffix
(
const
char
*
suffix
)
noexcept
{
if
(
suffix
==
nullptr
)
return
nullptr
;
assert
(
suffix
!=
nullptr
);
archive_plugins_for_each_enabled
(
plugin
)
if
(
plugin
->
suffixes
!=
nullptr
&&
...
...
This diff is collapsed.
Click to expand it.
src/input/plugins/ArchiveInputPlugin.cxx
View file @
0e8ca449
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment