aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-12-16 16:38:01 +0100
committerMax Kellermann <max@duempel.org>2009-12-16 17:10:15 +0100
commitf9af1a445efedc049a6a608a76088578e3cca4b3 (patch)
tree0d9e6f5ecc3ad1f2358faa7389874af8e0809756
parent0bc8c0c1da4490aad502dddbbc7c60564c4083a7 (diff)
downloadmpd-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.
-rw-r--r--src/input/archive_input_plugin.c2
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);