diff options
author | Max Kellermann <max@duempel.org> | 2009-12-16 16:38:01 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-12-16 17:10:15 +0100 |
commit | f9af1a445efedc049a6a608a76088578e3cca4b3 (patch) | |
tree | 0d9e6f5ecc3ad1f2358faa7389874af8e0809756 /src | |
parent | 0bc8c0c1da4490aad502dddbbc7c60564c4083a7 (diff) | |
download | mpd-f9af1a445efedc049a6a608a76088578e3cca4b3.tar.gz mpd-f9af1a445efedc049a6a608a76088578e3cca4b3.tar.xz mpd-f9af1a445efedc049a6a608a76088578e3cca4b3.zip |
input/archive: check for archive_file_open() errors
This fixes a NULL pointer dereference in case of archive plugin
failure.
Diffstat (limited to 'src')
-rw-r--r-- | src/input/archive_input_plugin.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/input/archive_input_plugin.c b/src/input/archive_input_plugin.c index 4847b4483..15070f91a 100644 --- a/src/input/archive_input_plugin.c +++ b/src/input/archive_input_plugin.c @@ -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); |