mirror of
https://mirror.skon.top/https://github.com/FFmpeg/FFmpeg
synced 2026-04-20 21:00:41 +08:00
avformat/mp3dec; Check for avio_size() failure
Fixes: CID1608710 Improper use of negative value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit bb936a1a72)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -118,9 +118,10 @@ static void read_xing_toc(AVFormatContext *s, int64_t filesize, int64_t duration
|
||||
int fill_index = mp3->usetoc == 1 && duration > 0;
|
||||
|
||||
if (!filesize &&
|
||||
!(filesize = avio_size(s->pb))) {
|
||||
(filesize = avio_size(s->pb)) <= 0) {
|
||||
av_log(s, AV_LOG_WARNING, "Cannot determine file size, skipping TOC table.\n");
|
||||
fill_index = 0;
|
||||
filesize = 0;
|
||||
}
|
||||
|
||||
for (i = 0; i < XING_TOC_COUNT; i++) {
|
||||
|
||||
Reference in New Issue
Block a user