Message ID | GV1P250MB0737573F097D7A823FE23B2A8FEB2@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM |
---|---|
State | Accepted |
Commit | b47116be45d9d609ebef520f2a39ea35072a6203 |
Headers | show |
Series | [FFmpeg-devel,1/6] avformat/oggdec: Check ffio_ensure_seekback() | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
Andreas Rheinhardt: > Fixes Coverity issue #1492327. > > Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> > --- > libavformat/oggdec.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c > index 8ea81e5d45..5339fdd32c 100644 > --- a/libavformat/oggdec.c > +++ b/libavformat/oggdec.c > @@ -364,7 +364,9 @@ static int ogg_read_page(AVFormatContext *s, int *sid, int probing) > ffio_init_checksum(bc, ff_crc04C11DB7_update, 0x4fa9b05f); > > /* To rewind if checksum is bad/check magic on switches - this is the max packet size */ > - ffio_ensure_seekback(bc, MAX_PAGE_SIZE); > + ret = ffio_ensure_seekback(bc, MAX_PAGE_SIZE); > + if (ret < 0) > + return ret; > start_pos = avio_tell(bc); > > version = avio_r8(bc); Will apply this patchset tomorrow unless there are objections. - Andreas
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c index 8ea81e5d45..5339fdd32c 100644 --- a/libavformat/oggdec.c +++ b/libavformat/oggdec.c @@ -364,7 +364,9 @@ static int ogg_read_page(AVFormatContext *s, int *sid, int probing) ffio_init_checksum(bc, ff_crc04C11DB7_update, 0x4fa9b05f); /* To rewind if checksum is bad/check magic on switches - this is the max packet size */ - ffio_ensure_seekback(bc, MAX_PAGE_SIZE); + ret = ffio_ensure_seekback(bc, MAX_PAGE_SIZE); + if (ret < 0) + return ret; start_pos = avio_tell(bc); version = avio_r8(bc);
Fixes Coverity issue #1492327. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavformat/oggdec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)