aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/flac_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/decoder/flac_plugin.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/decoder/flac_plugin.c b/src/decoder/flac_plugin.c
index 9c93983a0..289fada0b 100644
--- a/src/decoder/flac_plugin.c
+++ b/src/decoder/flac_plugin.c
@@ -75,6 +75,9 @@ static flac_length_status flacLength(mpd_unused const flac_decoder * flacDec,
{
FlacData *data = (FlacData *) fdata;
+ if (data->inStream->size < 0)
+ return flac_length_status_unsupported;
+
*length = (size_t) (data->inStream->size);
return flac_length_status_ok;