From 607d276a8d1a9b6c1a5ab08af9d31a5793ae4fdd Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Fri, 27 Jun 2025 03:15:46 -0700 Subject: [PATCH] Update minimp3_ex.h Guard possible buffer overrun --- minimp3_ex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/minimp3_ex.h b/minimp3_ex.h index 1b7671d..9da329c 100644 --- a/minimp3_ex.h +++ b/minimp3_ex.h @@ -615,7 +615,7 @@ int mp3dec_iterate_cb(mp3dec_io_t *io, uint8_t *buf, size_t buf_size, MP3D_ITERA readed += i; if (callback) { - if ((ret = callback(user_data, hdr, frame_size, free_format_bytes, filled - consumed, readed, &frame_info))) + if ((ret = callback(user_data, hdr, frame_size, free_format_bytes, filled - consumed - i, readed, &frame_info))) return ret; } readed += frame_size;