shithub: mp3dec

Download patch

ref: e46488c87ede450d9f2d12b6d1d67d6d963f6986
parent: 0a2ff3be7ff27fe76439b257bdf0ddd8aea0aba0
author: lieff <[email protected]>
date: Wed Mar 4 12:37:30 EST 2020

mp3dec_ex: limit mp3dec_detect_* functions scan size for non-callbacks case

--- a/minimp3_ex.h
+++ b/minimp3_ex.h
@@ -255,6 +255,8 @@
     } else
     {
         mp3dec_skip_id3v1(buf, &filled);
+        if (filled > MINIMP3_BUF_SIZE)
+            filled = MINIMP3_BUF_SIZE;
     }
     int free_format_bytes, frame_size;
     mp3d_find_frame(buf, MINIMP3_MIN(filled, (size_t)INT_MAX), &free_format_bytes, &frame_size);