aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/plugins/MpcdecDecoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-19 20:55:51 +0200
committerMax Kellermann <max@duempel.org>2014-08-19 20:55:51 +0200
commita862e363ead63f39d60061096d3d050bc81aa6e2 (patch)
tree05a5ab2c46407d57d31886f4f7e1565c0998d841 /src/decoder/plugins/MpcdecDecoderPlugin.cxx
parent2e64afca27e608e7f9e3be38cb6afd14211933ef (diff)
downloadmpd-a862e363ead63f39d60061096d3d050bc81aa6e2.tar.gz
mpd-a862e363ead63f39d60061096d3d050bc81aa6e2.tar.xz
mpd-a862e363ead63f39d60061096d3d050bc81aa6e2.zip
decoder/mpcdec: check InputStream::KnownSize()
Diffstat (limited to 'src/decoder/plugins/MpcdecDecoderPlugin.cxx')
-rw-r--r--src/decoder/plugins/MpcdecDecoderPlugin.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/decoder/plugins/MpcdecDecoderPlugin.cxx b/src/decoder/plugins/MpcdecDecoderPlugin.cxx
index f86cb3c81..d7dab05e0 100644
--- a/src/decoder/plugins/MpcdecDecoderPlugin.cxx
+++ b/src/decoder/plugins/MpcdecDecoderPlugin.cxx
@@ -84,6 +84,9 @@ mpc_getsize_cb(mpc_reader *reader)
struct mpc_decoder_data *data =
(struct mpc_decoder_data *)reader->data;
+ if (!data->is.KnownSize())
+ return -1;
+
return data->is.GetSize();
}