avformat/gifdec: Check ffio_ensure_seekback()

Fixes Coverity issue #1598400.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2024-05-22 06:49:43 +02:00
parent b47116be45
commit 590fffe6ad
1 changed files with 4 additions and 1 deletions

View File

@ -85,7 +85,10 @@ static int gif_probe(const AVProbeData *p)
static int resync(AVIOContext *pb)
{
ffio_ensure_seekback(pb, 13);
int ret = ffio_ensure_seekback(pb, 13);
if (ret < 0)
return ret;
for (int i = 0; i < 6; i++) {
int b = avio_r8(pb);
if (b != gif87a_sig[i] && b != gif89a_sig[i])