diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-05-22 06:53:07 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-05-25 13:51:27 +0200 |
commit | 95faf45af16b15d55b3d9f8f3244d1437649d763 (patch) | |
tree | 0fcfc966e00eeee8e0992f20c465df24ba544022 /libavformat | |
parent | 6dc8d4eea828c119c49b7b5742f7a6f9989b720b (diff) | |
download | ffmpeg-95faf45af16b15d55b3d9f8f3244d1437649d763.tar.gz |
avformat/qoadec: Check ffio_ensure_seekback()
Fixes Coverity issue #1598406.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/qoadec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/qoadec.c b/libavformat/qoadec.c index 9cce5157fc..a9632c46c3 100644 --- a/libavformat/qoadec.c +++ b/libavformat/qoadec.c @@ -41,6 +41,7 @@ static int qoa_read_header(AVFormatContext *s) { AVIOContext *pb = s->pb; AVStream *st; + int ret; st = avformat_new_stream(s, NULL); if (!st) @@ -52,7 +53,9 @@ static int qoa_read_header(AVFormatContext *s) st->duration = avio_rb32(pb); st->start_time = 0; - ffio_ensure_seekback(pb, 4); + ret = ffio_ensure_seekback(pb, 4); + if (ret < 0) + return ret; st->codecpar->ch_layout.nb_channels = avio_r8(pb); if (st->codecpar->ch_layout.nb_channels == 0) return AVERROR_INVALIDDATA; |