diff options
Diffstat (limited to 'src/decoder/oggflac_plugin.c')
-rw-r--r-- | src/decoder/oggflac_plugin.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/decoder/oggflac_plugin.c b/src/decoder/oggflac_plugin.c index b9ef13722..7550005d9 100644 --- a/src/decoder/oggflac_plugin.c +++ b/src/decoder/oggflac_plugin.c @@ -92,6 +92,9 @@ static OggFLAC__SeekableStreamDecoderLengthStatus of_length_cb(mpd_unused const { FlacData *data = (FlacData *) fdata; + if (data->inStream->size < 0) + return OggFLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_ERROR; + *length = (size_t) (data->inStream->size); return OggFLAC__SEEKABLE_STREAM_DECODER_LENGTH_STATUS_OK; |