diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-05-22 06:49:43 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2024-05-25 13:51:27 +0200 |
commit | 590fffe6adcfdc13e6f520a47be0ece72fe0707d (patch) | |
tree | 13d05c9937bed22a1f3353bb3297cfd7071ead12 | |
parent | b47116be45d9d609ebef520f2a39ea35072a6203 (diff) | |
download | ffmpeg-590fffe6adcfdc13e6f520a47be0ece72fe0707d.tar.gz |
avformat/gifdec: Check ffio_ensure_seekback()
Fixes Coverity issue #1598400.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r-- | libavformat/gifdec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/gifdec.c b/libavformat/gifdec.c index 294007682b..d5f06adc64 100644 --- a/libavformat/gifdec.c +++ b/libavformat/gifdec.c @@ -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]) |