aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/inputPlugins/mp3_plugin.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/inputPlugins/mp3_plugin.c b/src/inputPlugins/mp3_plugin.c
index cdb2a74c0..33087e134 100644
--- a/src/inputPlugins/mp3_plugin.c
+++ b/src/inputPlugins/mp3_plugin.c
@@ -187,6 +187,10 @@ int fillMp3InputBuffer(mp3DecodeData * data) {
remaining = 0;
}
+ /* we've exhausted the read buffer, so give up!, these potential
+ * mp3 frames are way too big, and thus unlikely to be mp3 frames */
+ if(readSize == 0) return -1;
+
readed = readFromInputStream(data->inStream, readStart, (size_t)1,
readSize);
if(readed <= 0 && inputStreamAtEOF(data->inStream)) return -1;