X-Git-Url: https://git.piment-noir.org/?p=deb_ffmpeg.git;a=blobdiff_plain;f=ffmpeg%2Flibavformat%2Faviobuf.c;h=0b0748e954680c0b952d71f1cdc829cbb36f5444;hp=f374314fba8e5dd41fc9dc4f7d0473fb8c63fa6a;hb=dcebb6f35d810c9009a455808b016c790bb633b4;hpb=f6fa7814ccfe3e76514b36cf04f5cd3cb657c8cf diff --git a/ffmpeg/libavformat/aviobuf.c b/ffmpeg/libavformat/aviobuf.c index f374314..0b0748e 100644 --- a/ffmpeg/libavformat/aviobuf.c +++ b/ffmpeg/libavformat/aviobuf.c @@ -223,6 +223,9 @@ int64_t avio_seek(AVIOContext *s, int64_t offset, int whence) return offset1; offset += offset1; } + if (offset < 0) + return AVERROR(EINVAL); + offset1 = offset - pos; if (!s->must_flush && (!s->direct || !s->seek) && offset1 >= 0 && offset1 <= buffer_size) {